Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes two small bugs/inconsistencies found by LLMs which incorrectly reported them as "vulnerabilities".
PeopleService.loadOwnerslets any app with contacts permission to access Google account details. It is a deliberate choice made in 9d0bb96 to fix Hangouts Meet exiting with "selecting an account is required" #943, though by reading the issue it seems to me that cb5fe55 could have been enough to fix the reported bug.This behavior is likely a bit too lenient, and also doesn't match what GMS does. On a device running vanilla Play Services, a test app with
READ_CONTACTSpermission trying to call loadOwners gets back ajava.lang.SecurityException: PackageVerificationRslt: not allowed.if (fallbackUrl in ALLOWED_FALLBACK_PREFIXES)was actually meant to check for the opposite condition, and also used the entire URL instead of matching the prefix only. It doesn't lead to an open redirect vulnerability though, because Google's AccountChooser endpoint returns a 400 error if the fallback URL looks wrong.While at it, I slightly refactored the function to make guard conditions more apparent.