Bug 56603

Summary: Inappropiate ProxyPassReverse match when interpolated URL is empty string
Product: Apache httpd-2 Reporter: ajprout
Component: mod_proxyAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal Keywords: FixedInTrunk, PatchAvailable
Priority: P2    
Version: 2.4.9   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch to fix 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.