Bug 56603 - Inappropiate ProxyPassReverse match when interpolated URL is empty string
Summary: Inappropiate ProxyPassReverse match when interpolated URL is empty string
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.9
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: FixedInTrunk, PatchAvailable
Depends on:
Reported: 2014-06-06 21:17 UTC by ajprout
Modified: 2015-01-23 09:10 UTC (History)
0 users

Patch to fix this bug (549 bytes, patch)
2014-06-06 21:17 UTC, ajprout
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ajprout 2014-06-06 21:17:14 UTC
Created attachment 31695 [details]
Patch to fix this bug

When there is a ProxyPassReverse configured to use an interpolated environment variable for the URL, and that environment variable isn't set for the current request, ap_proxy_location_reverse_map() will do strncasecmp(, , 0) and match anything to the empty ProxyPassReverse. The attached patch modifies ap_proxy_location_reverse_map() to fix this by skipping entries where the URL to match is a zero length string.
Comment 1 Eric Covener 2014-12-29 21:06:15 UTC
Thanks for the report and patch, committed in trunk r1648433 and will propose for backport
Comment 2 Yann Ylavic 2015-01-23 09:10:46 UTC
Backported to 2.4.11 in r1651094.