Skip to content

Commit

Permalink
JSPrompt "Security check" should whitelist all file URIs too
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil Maj committed Oct 25, 2011
1 parent 505081f commit ff2ee67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/src/com/phonegap/DroidGap.java
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ public boolean onJsPrompt(WebView view, String url, String message, String defau
// 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;
}

Expand Down

0 comments on commit ff2ee67

Please sign in to comment.