encoding/decoding problems with the UrlRewriteFilter with encoded slashes in the URL

Issue #13 resolved
Robert Jäschke created an issue

The filter has URL decode/encode problems while matching rules. Before the UrlRewriteFilter checks for matches in the config for the requested path, it decodes the complete path (UrlDecoder.decode). If the path contains an encoded slash (%2F) the wrong rule is used to rewrite the request. E.g. with the following two rules in urlrewrite.xml:

  1. /search/SEARCH is rewritten to /search with the parameter search = SEARCH
  2. /search/SEARCH/TAG is rewritten to /search with the parameter search = SEARCH and the parameter tag = TAG

For the path /search/ABC%2FCDE the second rule is used instead of the first (which would be correct).

Currently, also the /bibtexkey pages are effected by this bug.

Maybe this is caused by a missed config option?

Comments (4)

  1. Log in to comment