[Varnish] #755: Incorrect escaping of purges

Varnish varnish-bugs at varnish-cache.org
Mon May 16 11:40:46 CEST 2011

#755: Incorrect escaping of purges
 Reporter:  kristian  |        Owner:  kristian
     Type:  defect    |       Status:  closed  
 Priority:  normal    |    Milestone:          
Component:  varnishd  |      Version:  trunk   
 Severity:  normal    |   Resolution:  fixed   
 Keywords:            |  
Changes (by phk):

  * status:  new => closed
  * resolution:  => fixed


 Ok, I think I got to the bottom of this mess now.

 The reason you need to escape \ here is that CLI has quoted strings.

 I am not prepared to rule that we will never need a CLI argument with a
 space in it, so CLI quoted arguments are here to stay, which means that "
 needs to be quoted and consequently \ also.

 We could restrict \ escaping to "..." quoted arguments in the CLI, which
 would allow you to give \.foo as a blank argument, but that would only
 work for regexp's without whitespace.

 The real solution is to use a CLI here document, which eliminates the need
 for any kind of escaping.

 However, this did not work for CLI commands forwarded to the child

 This issue is fixed under ticket #917, and so I think we can now also
 close this ticket:

 Use a here document:

 ban req.url ~ << FOSDKFJDSLKF

Ticket URL: <http://www.varnish-cache.org/trac/ticket/755#comment:4>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list