On Tuesday 14 September 2010, Jeremy Kemper wrote:
> On Tue, Sep 14, 2010 at 11:13 AM, Michael Schuerig 
<mich...@schuerig.de> wrote:
[...]
> > There is nothing in the app's log. The problem appears to be caused
> > by the "/" in the :url parameter, even though they are encoded as
> > "%2F".
> > 
> > I'd prefer if I didn't have to read through all the ActionPack and
> > Rack routing code to understand what's happening and find a
> > remedy. It must be possible to do this cleanly.
> 
> Tricky issue. To fix, enable AllowEncodedSlashes in Apache:
> http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes

Thanks, Jeremy, that's been very helpful. In combination with route 
globbing, i.e.

  get 'things/*url' => 'things#show'

the intended controller action is called. Curiously, consecutive slashes 
are collapsed somewhere in parameter processing, so that "http://foo"; 
becomes "http:/foo". Well, I can work around that, though, of course I'd 
prefer if I didn't have to.

Are there any security implications of enabling AllowEncodedSlashes? I 
figure there must be a reason that they are not enabled by default.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to