Skip to content

feat: Protect WebViewActivity to prevent open malicious url#724

Open
benjaminVadon wants to merge 2 commits intomainfrom
protect-webview-with-host-whitelist
Open

feat: Protect WebViewActivity to prevent open malicious url#724
benjaminVadon wants to merge 2 commits intomainfrom
protect-webview-with-host-whitelist

Conversation

@benjaminVadon
Copy link
Contributor

No description provided.

@github-actions
Copy link

The changes implement a host whitelist to restrict URL loading, which is a good security improvement. However, the isWhiteListed function contains a critical logic error: indexOfFirst { host == it } > 0 incorrectly excludes the first element of the whitelist (index 0), causing valid hosts to be rejected. Change the condition to >= 0 or use any { host == it } to correctly validate against all whitelist entries.

#ai-review-summary

@benjaminVadon benjaminVadon force-pushed the protect-webview-with-host-whitelist branch from f72af6c to d2ca9f4 Compare March 17, 2026 13:27
@benjaminVadon benjaminVadon force-pushed the protect-webview-with-host-whitelist branch from d2ca9f4 to 0f94e67 Compare March 18, 2026 10:49
@sonarqubecloud
Copy link

@benjaminVadon benjaminVadon requested a review from sirambd March 18, 2026 11:32
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.

2 participants