mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-18 22:52:54 +08:00
Remove redundant whitelist checks
This commit is contained in:
parent
167e283450
commit
a8bec4ec9c
@ -351,10 +351,7 @@ public class CordovaActivity extends Activity {
|
||||
// If errorUrl specified, then load it
|
||||
final String errorUrl = preferences.getString("errorUrl", null);
|
||||
CordovaUriHelper helper = new CordovaUriHelper(this.cordovaInterface, appView);
|
||||
if ((errorUrl != null) &&
|
||||
(!failingUrl.equals(errorUrl)) &&
|
||||
(appView != null && helper.shouldAllowNavigation(errorUrl))
|
||||
) {
|
||||
if ((errorUrl != null) && (!failingUrl.equals(errorUrl)) && (appView != null)) {
|
||||
// Load URL on UI thread
|
||||
me.runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
|
@ -171,11 +171,8 @@ public class CordovaBridge {
|
||||
// Protect against random iframes being able to talk through the bridge.
|
||||
// Trust only file URLs and pages which the app would have been allowed
|
||||
// to navigate to anyway.
|
||||
// Trust only file URLs and the start URL's domain.
|
||||
// The extra origin.startsWith("http") is to protect against iframes with data: having "" as origin.
|
||||
if (origin.startsWith("file:") ||
|
||||
origin.startsWith(this.appContentUrlPrefix) ||
|
||||
(origin.startsWith("http") && loadedUrl.startsWith(origin)) ||
|
||||
helper.shouldAllowNavigation(origin)) {
|
||||
// Enable the bridge
|
||||
int bridgeMode = Integer.parseInt(defaultValue.substring(9));
|
||||
|
Loading…
Reference in New Issue
Block a user