Skip to content
Snippets Groups Projects

Fix bug by encoding security policy URIs

Merged Alexander Turinske requested to merge 360482-encode-policy-names-for-url into master
All threads resolved!

What does this MR do and why?

Fix bug by encoding security policy URIs

  • for security policies whose name contain characters that should be encoded (e.g. /), those characters were not being encoded leading to 404s
  • encode special characters for URI
  • Update encoding of merge request settings patg
  • scan result edit path needed encoding for slashes
  • update tests

Changelog: fixed

EE: true

Related to #360482 (closed)

Screenshots or screen recordings

Page Before After
Scan Execution from Security & Compliances => Policies encode_before encode_after
Scan Result from project => Settings => General => Merge request approvals scan_result_-_b scan_result_-_a

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Navigate to a project => Security & Compliance => Policies => New policy
  3. Create a policy with all sorts of weird characters (e.g. /, -, , etcetera)
  4. Save the policy and merge the resulting MR
  5. Navigate back to the project => Security & Compliance => Policies => select newly created policy => Edit policy
  6. Ensure there isn't a 404

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Alexander Turinske

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Alexander Turinske
  • Alexander Turinske
  • Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits 604c84fc and b8591e7d

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 3.45 MB 3.45 MB - -0.0 %
    mainChunk 1.93 MB 1.93 MB - 0.0 %

    :tada: Significant Reduction: 1

    Expand
    Entrypoint / Name Size before Size after Diff Diff in percent
    pages.admin.runners.show 1.07 MB 1007.87 KB -87.28 KB -8.0 %

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

  • Allure report

    allure-report-publisher generated test report!

    review-qa-blocking: :exclamation: test report for b8591e7d

    expand test summary
    +-------------------------------------------------------------------+
    |                          suites summary                           |
    +----------------------+--------+--------+---------+-------+--------+
    |                      | passed | failed | skipped | flaky | result |
    +----------------------+--------+--------+---------+-------+--------+
    | Protect              | 2      | 0      | 0       | 0     | ✅     |
    | Plan                 | 41     | 0      | 1       | 1     | ❗     |
    | Verify               | 12     | 0      | 1       | 7     | ❗     |
    | Manage               | 26     | 0      | 2       | 10    | ❗     |
    | Package              | 24     | 0      | 1       | 24    | ❗     |
    | Configure            | 0      | 0      | 1       | 0     | ➖     |
    | Create               | 17     | 0      | 2       | 3     | ❗     |
    | Version sanity check | 0      | 0      | 1       | 0     | ➖     |
    +----------------------+--------+--------+---------+-------+--------+
    | Total                | 122    | 0      | 9       | 45    | ❗     |
    +----------------------+--------+--------+---------+-------+--------+
  • Alexander Turinske added 198 commits

    added 198 commits

    Compare with previous version

  • Zamir Martins
  • Zamir Martins approved this merge request

    approved this merge request

  • :wave: @zmartins, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • added 1 commit

    • b8591e7d - Update encoding of merge request settings path

    Compare with previous version

  • Alexander Turinske requested review from @ekigbo

    requested review from @ekigbo

  • Alexander Turinske changed the description

    changed the description

  • Zamir Martins removed review request for @zmartins

    removed review request for @zmartins

  • Ezekiel Kigbo resolved all threads

    resolved all threads

  • Ezekiel Kigbo approved this merge request

    approved this merge request

  • Nice work @aturinske, great work on the fix :tada: LGTM.

  • Ezekiel Kigbo enabled an automatic merge when the pipeline for c1cef624 succeeds

    enabled an automatic merge when the pipeline for c1cef624 succeeds

  • mentioned in issue #357923 (closed)

  • merged

  • Ezekiel Kigbo mentioned in commit 3586627f

    mentioned in commit 3586627f

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading