cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject [4/8] android commit: Use /app_webview/ rather than app_webview to filter bad requests
Date Wed, 11 Feb 2015 19:02:24 GMT
Use /app_webview/ rather than app_webview to filter bad requests


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/c8f44ab4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/c8f44ab4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/c8f44ab4

Branch: refs/heads/unplug-whitelist-4.0.0
Commit: c8f44ab4602e1c5ab52ef9789265181185a0ae39
Parents: ac1f9c7
Author: Ian Clelland <iclelland@chromium.org>
Authored: Thu Oct 30 12:17:05 2014 -0400
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Wed Feb 11 14:01:11 2015 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaUriHelper.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/c8f44ab4/framework/src/org/apache/cordova/CordovaUriHelper.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaUriHelper.java b/framework/src/org/apache/cordova/CordovaUriHelper.java
index 9aea817..64a0a00 100644
--- a/framework/src/org/apache/cordova/CordovaUriHelper.java
+++ b/framework/src/org/apache/cordova/CordovaUriHelper.java
@@ -49,12 +49,12 @@ public class CordovaUriHelper {
         Boolean pluginManagerAllowsNavigation = this.appView.getPluginManager().shouldAllowNavigation(url);
         if (pluginManagerAllowsNavigation == null) {
             // Default policy:
-            // Internal urls on file:// or data:// that do not contain "app_webview" are
allowed for navigation
+            // Internal urls on file:// or data:// that do not contain "/app_webview/" are
allowed for navigation
             if(url.startsWith("file://") || url.startsWith("data:"))
             {
                 //This directory on WebKit/Blink based webviews contains SQLite databases!
                 //DON'T CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
-                return !url.contains("app_webview");
+                return !url.contains("/app_webview/");
             }
             return false;
         }
@@ -88,12 +88,12 @@ public class CordovaUriHelper {
         Boolean pluginManagerAllowsRequest = this.appView.getPluginManager().shouldAllowRequest(url);
         if (pluginManagerAllowsRequest == null) {
             // Default policy:
-            // Internal urls on file:// or data:// that do not contain "app_webview" are
allowed for navigation
+            // Internal urls on file:// or data:// that do not contain "/app_webview/" are
allowed for navigation
             if(url.startsWith("file://") || url.startsWith("data:"))
             {
                 //This directory on WebKit/Blink based webviews contains SQLite databases!
                 //DON'T CHANGE THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
-                return !url.contains("app_webview");
+                return !url.contains("/app_webview/");
             }
             return false;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message