Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix callback detection in Linux webview #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

viseztrance
Copy link

In google oauth, the uri gets passed around via a query parameter which causes the browser window to get closed too early.

https://accounts.google.com/CheckCookie?continue=https://accounts.google.com/signin/oauth/consent?...&redirect_uri=...

This PR ensures the redirect URL is matched only at the beginning of the current URI.

The change brings it on par with the windows version:
matching = url.rfind(redirectUrl_, 0) == 0;

Use `strncmp` to ensure the redirect URL is matched only at the
beginning of the current URI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant