When deslash is enabled and Apache mod_dir is enabled, visiting a url which resolves to a directory will result in an redirect loop.
What are the steps required to reproduce the bug?
Install latest global redirect module with deslashing enabled, on an Apache server using mod_dir (enabled by default on most systems).
Visit any directory, e.g. http://example.com/sites/default/files/
What behavior were you expecting?
The directory page would be loaded and a 403/404 error would occur.
What happened instead?
An infinite loop occurred which eventually timed out.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | globalredirect-check-directory-before-deslash-2013785-1.patch | 1.23 KB | markpavlitski |
Comments
Comment #1
markpavlitski commentedThis patch adds a check to confirm if the path is a directory before deslashing.
If it is a directory, the redirect does not take place.
Comment #2
jakob123 commentedFixes the issue. Even if it didn't cause a redirect loop, deslashing a directory is just wrong - the patch fixes that.
Comment #3
dbazuin commentedI can confirm the patch solves this issue.
Comment #4
seanbI was looking for this one. Nice fix!
Even tough sites/default/files should not be visited, showing a 403/404 is better then a redirect loop :)
Confirming RTBC!
Comment #5
rclemings commentedWorked perfectly for me.
It's been RTBC for four years now. Why isn't it committed?
Comment #7
BarisW commentedThanks all for the work!