Skip to content

Fix ActionController::UrlGenerationError

Vasilii Iakliushin requested to merge fix_url_generation_error into master

What does this MR do and why?

Sentry: https://sentry.gitlab.net/gitlab/gitlabcom/issues/4084018

Problem

We limit state value via Route constrains. But we don't validate the state parameter if it's provided via query parameters.

Solution

Return 404 page to match the route constrains validation.

Screenshots or screen recordings

Link to test: http://127.0.0.1:3000/gitlab-org/gitlab-test/-/branches?state=test

Before After
Screenshot_2023-01-31_at_19.33.33 Screenshot_2023-01-31_at_19.33.18

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 Vasilii Iakliushin

Merge request reports

Loading