Skip to content

fix(auth): Reject static asset paths as post-login redirects - #123095

Open
nora-shap wants to merge 2 commits into
masterfrom
fix/reject-static-asset-login-next
Open

fix(auth): Reject static asset paths as post-login redirects#123095
nora-shap wants to merge 2 commits into
masterfrom
fix/reject-static-asset-login-next

Conversation

@nora-shap

Copy link
Copy Markdown
Member

During my testing of the new user SSO flow (in prod), I was able to repeatedly trigger a bug where we try to redirect you to a service worker source map after you successfully login for the first time.

Unauthenticated requests for static assets can be stored as session _next. After login, we send users to those paths, which the SPA treated as org/project routes, leaving the new user on the The project you were looking for was not found page.

To prevent any other new users from experiencing this erroneous redirect, extend the checks in is_valid_redirect()

sentry-junior Bot and others added 2 commits August 28, 2026 17:28
Session `_next` can be poisoned by unauthenticated requests for assets
like service-worker source maps. Honor valid app destinations; fall back
to the normal login default when the path is a static asset.

Co-Authored-By: Nora Shapiro <nora.shapiro@sentry.io>
@nora-shap
nora-shap requested a review from a team August 28, 2026 23:44
@nora-shap
nora-shap requested a review from a team as a code owner August 28, 2026 23:44
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant