mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 09:02:50 +08:00
CB-7291: Only add file, content and data URLs to internal whitelist
This commit is contained in:
parent
4e3331ba66
commit
3b3bd9b6c9
@ -82,6 +82,11 @@ public class ConfigXmlParser {
|
||||
boolean insideFeature = false;
|
||||
ArrayList<String> urlMap = null;
|
||||
|
||||
// Add implicitly allowed URLs
|
||||
internalWhitelist.addWhiteListEntry("file:///*", false);
|
||||
internalWhitelist.addWhiteListEntry("content:///*", false);
|
||||
internalWhitelist.addWhiteListEntry("data:*", false);
|
||||
|
||||
while (eventType != XmlResourceParser.END_DOCUMENT) {
|
||||
if (eventType == XmlResourceParser.START_TAG) {
|
||||
String strNode = xml.getName();
|
||||
|
@ -98,10 +98,6 @@ public class Whitelist {
|
||||
|
||||
public Whitelist() {
|
||||
this.whiteList = new ArrayList<URLPattern>();
|
||||
// Add implicitly allowed URLs
|
||||
addWhiteListEntry("file:///*", false);
|
||||
addWhiteListEntry("content:///*", false);
|
||||
addWhiteListEntry("data:*", false);
|
||||
}
|
||||
|
||||
/* Match patterns (from http://developer.chrome.com/extensions/match_patterns.html)
|
||||
|
Loading…
Reference in New Issue
Block a user