balazsgerlei / SecureWebView

Android WebView wrapper with secure defaults to avoid security issues caused by misconfiguring WebViews.
Creative Commons Zero v1.0 Universal
3 stars 2 forks source link

🐞 Erroneous comparison of hosts during host matching #2

Closed drathar closed 3 months ago

drathar commented 3 months ago

In the code snippet of finding matching hosts there's no comparison of the member object and the parameter, but the member object gets compared to itself, which always produces a matching result.

case HOST -> { return this.uri.getHost() != null && this.uri.getHost().equals(this.uri.getHost()); }