-
Notifications
You must be signed in to change notification settings - Fork 109
Drop malformed url requests for non-main frame (was: AmazonWebView does not have WebResourceRequest) #38
Comments
I don't think it's possible to create a WebResourceRequest object from the string. We may be able to salvage some of the code because the String "request" is the URL of the request and a lot of the code in Focus is about matching the URLs to know which URL to show in the URL bar. |
The only method we use is if (!request.isForMainFrame() &&
!scheme.equals("http") && !scheme.equals("https")) {
// Block any malformed non-http(s) URIs. WebView will already ignore things like market: URLs,
// but not in all cases (malformed market: URIs, such as market:://... will still end up here).
// (Note: data: URIs are automatically handled by WebView, and won't end up here either.)
// file:// URIs are disabled separately by setting WebSettings.setAllowFileAccess()
return new AmazonWebResourceResponse(null, null, null);
} I didn't have time to investigate whether or not this would be sufficient, however. Note that the UrlMatcher for tracking protection whitelists first-party requests (against the |
liuche found where this was initially implemented and it contains useful comments: mozilla-mobile/focus-android#106 (comment) |
[triage] We're going to wait on the WebView upgrade to see if this API is added back in #379. |
This is handled by components now: they're probably doing the right thing. :) |
shouldInterceptRequest method takes a string instead of WebResourceRequest with AmazonWebView. Look into if we need to create a WebResourceRequest here.
The text was updated successfully, but these errors were encountered: