Skip to content

Fix DAST Profile redirection on save

Dheeraj Joshi requested to merge djadmin-hot-fix-redirect-url-check into master

Fixes #333417 (closed)

What does this MR do?

This MR adds strict check for URL validation when redirecting user to their previous page.

The current implementation is not strict enough and thus caused #333417 (closed)

When referrer value is https://gitlab.com/project-path/dast_scans, and it passes the check for newly allowed path /project-path/dast due to .includes() usage. This MR moves the check to strict equality ===.

Screenshots (strongly suggested)

before after
redirect_bug site_profile_redirect

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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
Edited by Dheeraj Joshi

Merge request reports