You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/10/30 17:20:40 UTC
[5/7] android commit: Use /app_webview/ rather than app_webview to
filter bad requests
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/fe15d34a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/fe15d34a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/fe15d34a
Branch: refs/heads/unplug-whitelist
Commit: fe15d34a80b238016b60d96b0520d45e90f55b3b
Parents: 2358427
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Oct 30 12:17:05 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Oct 30 12:19:06 2014 -0400
----------------------------------------------------------------------
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/fe15d34a/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