Fix regexp matching when using API with group/project syntax
Projects can be specified in two ways:
- Project ID integer (e.g. 142)
- Project group/name (e.g. group%2Fproject)
Here's the issue: by the time gitlab-workhorse receives the query, the %2F
is decoded into a slash, and so gitlab-workhorse sees:
/api/v3/projects/:group_name/:project_name/repository/archive
In 0.4.2, the regex just attempted to match the last part of the URL: repository/archive
. In 0.5.0, the anchor ^
forces the API endpoint regexp to match the following form:
/api/v3/projects/:project_id/repository/archive
The extra slash throws the regexp off and causes gitlab-workhorse to forward the request along.
Closes gitlab-org/gitlab-ce#4124
Merge request reports
Activity
Reassigned to @marin
I will assign this to @jacobvosmaer since he is the maintainer and he is back from vacation.
Reassigned to @jacobvosmaer
I think we should go with !23 (merged) instead.
mentioned in commit 6b0ce357