mirror of
https://github.com/etesync/android
synced 2025-01-11 16:21:10 +00:00
Webview: Only load pages from a whilelist, not all.
This was causing issues with the dashboard page because of stripe. The best mitigation at the moment, is to only load pages from a whitelist.
This commit is contained in:
parent
e4043642db
commit
3d217f47af
@ -137,8 +137,15 @@ public class WebViewActivity extends AppCompatActivity {
|
|||||||
mWebView.invalidate();
|
mWebView.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean uriEqual(Uri uri1, Uri uri2) {
|
||||||
|
return uri1.getHost().equals(uri2.getHost()) &&
|
||||||
|
uri1.getPath().equals(uri2.getPath());
|
||||||
|
}
|
||||||
|
|
||||||
private boolean shouldOverrideUrl(Uri uri) {
|
private boolean shouldOverrideUrl(Uri uri) {
|
||||||
if (Constants.webUri.getHost().equals(uri.getHost())) {
|
if (uriEqual(Constants.faqUri, uri) ||
|
||||||
|
uriEqual(Constants.helpUri, uri) ||
|
||||||
|
uriEqual(Constants.registrationUrl, uri)) {
|
||||||
if (uri.getQueryParameter(QUERY_KEY_EMBEDDED) != null) {
|
if (uri.getQueryParameter(QUERY_KEY_EMBEDDED) != null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user