Allow valid namespace paths with dots for api PUT
What does this MR do?
By default Rails doesn't allow dots in wildcard segments. Rails allows this to be overridden with constraints, which were already being specified on the namespace scope in config/routes/projects.rb
, but they were not being overridden on the actual put
command for ee/lib/ee/api/namespaces.rb
.
This MR adds the same Regex used for the namespace scope in config/routes/projects.rb
to the id requirements
of put :id
, fixing the issue described in customers-gitlab-com#711 (closed)
Closes customers-gitlab-com#711 (closed)
Also fixes PUT :id/gitlab_subscription
, POST :id/gitlab_subscription
and GET :id/gitlab_subscription
when using the namespace path that contains dots.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team