From ff2ee67cb87286b9613679441581bd6fa9b09173 Mon Sep 17 00:00:00 2001 From: Fil Maj Date: Tue, 25 Oct 2011 15:34:32 -0700 Subject: [PATCH] JSPrompt "Security check" should whitelist all file URIs too --- framework/src/com/phonegap/DroidGap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index e6ba479a..8eddc755 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -1042,7 +1042,7 @@ public class DroidGap extends PhonegapActivity { // Security check to make sure any requests are coming from the page initially // loaded in webview and not another loaded in an iframe. boolean reqOk = false; - if (url.indexOf(this.ctx.baseUrl) == 0 || isUrlWhiteListed(url)) { + if (url.startsWith("file://") || url.indexOf(this.ctx.baseUrl) == 0 || isUrlWhiteListed(url)) { reqOk = true; }