URL Encode Scan Policy name when editing policy
Summary
Steps to reproduce
- Create Project_A and add file
.gitlab/security-policies/policy.yml
:
type: scan_result_policy
name: example/example
description: Example
enabled: true
rules:
- type: scan_finding
branches: []
scanners: []
vulnerabilities_allowed: 0
severity_levels:
- critical
vulnerability_states:
- newly_detected
actions:
- type: require_approval
approvals_required: 1
group_approver_ids:
- 5551212
- Create Project_B and set Project A using
Edit policy project
- Refresh the Policies page to see the now-applied policies
- Click on
example-org/example
- Click
Edit Policy
- Get a 404 when the Edit URL includes
example-org/example
, which is interpreted as part of the path: https://gitlab.example.com/project_b/-/security/policies/example/example/edit?environment_id=-1&type=scan_result_policy
Example Project
What is the current bug behavior?
404
What is the expected correct behavior?
Policy editor
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)