Development

AllowEncodedSlashes

You must first sign up to be able to contribute.

Apache AllowEncodedSlashes directive is off by default, http://httpd.apache.org/docs/trunk/mod/core.html#allowencodedslashes

This will result in a 404 error for any URLs with encoded slashes, %2f for / and %5c for \ on according systems

Note that even when AllowEncodedSlashes is off, encoded slashes may appear in query strings without resulting in a 404 error

symfony generates encoded slashes for parameter names or values containing slashes, e.g. $routing->generate(null, array('next' => '/module/action'));

This is only a problem for parameters which are variables, e.g.

example:
  url: /example/:next

- or star parameters, e.g.

example:
  url: /example/*

Two possible workarounds are to enable AllowEncodedSlashes, or configure symfony routing such that parameter names or values which might contain slashes are generated in the query string instead of a variable or star parameter, i.e.

  • /example/%2fmodule%2faction // Doesn't work
  • /example/next/%2fmodule%2faction // Doesn't work
  • /example?next=%2fmodule%2faction // Works

To configure symfony routing, enable extra_parameters_as_query_string, which is off by default