Bug 63084 - AllowEncodedSlashes breaks some Jenkins URLs
Summary: AllowEncodedSlashes breaks some Jenkins URLs
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.6
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-17 16:18 UTC by Robert Osowiecki
Modified: 2019-01-17 17:35 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Osowiecki 2019-01-17 16:18:13 UTC
I've tried different AllowEncodedSlashes settings to make my Jenkins work with Apache ProxyPass, but url like http://myjenkins.url/job/matrixUrlProblem/PATH=%2FmyPath%2Ffile1/ is changed depending on AllowEncodedSlashes setings to:
* /job/matrixUrlProblem/PATH=%252FmyPath%252Ffile1/ (with "NoDecode")
* /job/matrixUrlProblem/PATH=/myPath/file1/ (with "On")
... and both are rejected by Jenkins

Is it possible to turn off "%2f" handling completely? How about some "NoDecodeAndNoEncodeEither" option? ;)
Comment 1 Robert Osowiecki 2019-01-17 16:19:19 UTC
I also reported this issue to Jenkins devs: https://issues.jenkins-ci.org/browse/JENKINS-55656
Comment 2 Yann Ylavic 2019-01-17 16:32:46 UTC
(In reply to Robert Osowiecki from comment #0)
> * /job/matrixUrlProblem/PATH=%252FmyPath%252Ffile1/ (with "NoDecode")

It's not httpd that encodes %2F to %252F (it should be preserved), so Jenkins is not being consistent here it seems since it double encodes its own %2F.

Hm?
Comment 3 Yann Ylavic 2019-01-17 16:38:06 UTC
Wait, I spoke too soon, you probably need to SetEnv[If] "proxy-nocanon" for our case.
Comment 4 Yann Ylavic 2019-01-17 16:53:31 UTC
Correction again, the "nocanon" I'm talking about is not to be set by SetEnv[If] but on the ProxyPass line, like "ProxyPass .... nocanon".
Comment 5 Robert Osowiecki 2019-01-17 17:35:58 UTC
I've tried "nocanon" option and it works :) Thanks Yann!

I'm very glad my issue haven't stuck in "blame game" between Apache and Jenkins. As their advocate I'd say the reason for this inconsistency is / works as workspace path separator and slashes in values need to be encoded to avoid confusion.

My best regards,
Robert