mirror of
https://github.com/etesync/android
synced 2024-11-16 04:49:06 +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();
|
||||
}
|
||||
|
||||
private boolean uriEqual(Uri uri1, Uri uri2) {
|
||||
return uri1.getHost().equals(uri2.getHost()) &&
|
||||
uri1.getPath().equals(uri2.getPath());
|
||||
}
|
||||
|
||||
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) {
|
||||
return false;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user