dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 441 forks source link

Bugfix: slash in branch name gives 404 #1326

Closed Ooypunk closed 6 years ago

Ooypunk commented 7 years ago

Changes: .- ProjectController::build: now also checks GET-vars for chosen branch name .- Project/view: changed link on "build now": when a different branch is chosen, then send it through GET-vars, so slashes are not a problem

Contribution Type: bug fix Link to Intent to Implement: Link to Bug:

This pull request affects the following areas:

In raising this pull request, I confirm the following (please check boxes):

Detailed description of change: In Git, slashes are allowed in branch names, but when such a branch name is sent in the URL, Apache sends a 404 automatically, unless the AllowEncodedSlashes directive is set. A solution is to send that variable as GET-var, so instead of /project/build/2/feature%2ffoo%2fbar, we use /project/build/2?branch=feature%2ffoo%2fbar. Changes: .- ProjectController::build: now also checks GET-vars for chosen branch name (old behaviour still works) .- Project/view: changed link on "build now": when a different branch is chosen, then send it through GET-vars, so slashes are not a problem