jenkinsci / jenkinsci/matrix-project-plugin
[JENKINS-55656] URLs to matrixProject subtasks don't work behind Apache ProxyPass
- Dominant language
- Java
- Stars
- 17
- Forks
- 85
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 5
Description
My problem arises when:
- matrix job axis contains parameters with "/" sign (like: paths)
- Jenkins is proxied by Apache like in: JENKINS-12623
After run, lins to subtasks look like:
http://localhost:8080/job/matrixUrlProblem/PATH=%2FmyPath%2Ffile1/
Note that path parameter is encoded "/" changed to "%2F"
Everything works fine, but when I want to use http://jenkins.my.organization.com address, it doesn't work. Depending on AllowEncodedShlashes (see https://httpd.apache.org/docs/2.4/mod/core.html#allowencodedslashes ) setting results are differn:
- AllowEncodedShlashes Off: blocked by Apache
- AllowEncodedSlashes NoDecode: ERROR 404: Problem accessing /job/matrixUrlProblem/PATH=%252FmyPath%252Ffile1/ (% from original URL encoded as "%25")
- AllowEncodedSlashes On: ERROR 404: Problem accessing /job/matrixUrlProblem/PATH=/myPath/file1/ ("%2F" decoded back to /)
The easiest way is to classify it as problem outside Jenkins, but I hope you'll suggest some solution except "fix Apache"
---
Originally reported by robson, imported from: URLs to matrixProject subtasks don't work behind Apache ProxyPass
kohsuke
Raw content of original issue
My problem arises when:
- matrix job axis contains parameters with "/" sign (like: paths)
- Jenkins is proxied by Apache like in: JENKINS-12623
After run, lins to subtasks look like:
http://localhost:8080/job/matrixUrlProblem/PATH=%2FmyPath%2Ffile1/
Note that path parameter is encoded "/" changed to "%2F"
Everything works fine, but when I want to use http://jenkins.my.organization.com address, it doesn't work. Depending on AllowEncodedShlashes (see https://httpd.apache.org/docs/2.4/mod/core.html#allowencodedslashes ) setting results are differn:
- AllowEncodedShlashes Off: blocked by Apache
- AllowEncodedSlashes NoDecode: ERROR 404: Problem accessing /job/matrixUrlProblem/PATH=%252FmyPath%252Ffile1/ (% from original URL encoded as "%25")
- AllowEncodedSlashes On: ERROR 404: Problem accessing /job/matrixUrlProblem/PATH=/myPath/file1/ ("%2F" decoded back to /)
The easiest way is to classify it as problem outside Jenkins, but I hope you'll suggest some solution except "fix Apache"
environment
```
Jenkins ver. 2.150.1
org.jenkins-ci.plugins:matrix-project:1.13
httpd-2.4.6-67.el7.centos.6.x86_64
CentOS Linux release 7.3.1611
```
Contributor guide
Research direction
Start by reproducing the matrix-project-plugin URL behavior with an axis value containing slashes behind Apache ProxyPass, using the reported Jenkins, matrix-project, Apache, and CentOS versions. Compare the results for AllowEncodedSlashes Off, NoDecode, and On; done should mean subtask URLs work through the proxy without the encoded path being blocked, double-encoded, or decoded into path separators.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache, java
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100