diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-12-02 05:03:37 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-12-02 05:16:05 +0000 |
commit | d2e1caaab977829ad20a1e9a10abf87bd8e3e53f (patch) | |
tree | 0b578cc7f73f678081da23520606b1614eaa66a7 /actionpack/lib/action_controller/caching.rb | |
parent | 8ab24bec2e47940f04a220c7baf5236ac1b41fdd (diff) | |
download | rails-d2e1caaab977829ad20a1e9a10abf87bd8e3e53f.tar.gz rails-d2e1caaab977829ad20a1e9a10abf87bd8e3e53f.tar.bz2 rails-d2e1caaab977829ad20a1e9a10abf87bd8e3e53f.zip |
Try to escape each part of a path redirect route correctly
A path redirect may contain any and all parts of a url which have different
escaping rules for each part. This commit tries to escape each part correctly
by splitting the string into three chunks - path (which may also include a host),
query and fragment; then it applies the correct escape pattern to each part.
Whilst using `URI.parse` would be better, unfortunately the possible presence
of %{name} parameters in the path redirect string prevents us from using it so
we have to use a regular expression instead.
Fixes #13110.
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
0 files changed, 0 insertions, 0 deletions