Skip to content

[_] bugfix/url validation redirect - #2074

Open
CandelR wants to merge 6 commits into
masterfrom
bugfix/url-validation-redirect
Open

[_] bugfix/url validation redirect#2074
CandelR wants to merge 6 commits into
masterfrom
bugfix/url-validation-redirect

Conversation

@CandelR

@CandelR CandelR commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes a redirect vulnerability in the login/signup flow.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

  • Do login from the Desktop app, should complete and hand off credentials back to the app normally.
  • Do login from Mobile, should complete and open the app normally.

Additional Notes

@CandelR CandelR self-assigned this Jul 27, 2026
@CandelR
CandelR requested a review from larryrider as a code owner July 27, 2026 09:23
@CandelR CandelR added the enhancement New feature or request label Jul 27, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 486b8f0
Status: ✅  Deploy successful!
Preview URL: https://ae385f9c.drive-web.pages.dev
Branch Preview URL: https://bugfix-url-validation-redire.drive-web.pages.dev

View logs

})
) {
baseURL = decoded;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there is a redirectUri but it is not valid (malicius url not pointing to internxt or localhost) then we redirect to the baseURL. Maybe it would be better to just dont redirect at all

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s a good point, perhaps it would be better to display a ‘invalid URL’ notification and don't redirect. What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@CandelR
CandelR requested a review from larryrider July 31, 2026 13:25
return;
}

globalThis.location.href = universalLinkAuthUrl;
return;
}

globalThis.location.href = universalLinkAuthUrl;
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants