Skip to content

Commit 33aff11

Browse files
authored
Merge pull request apache#268 from wtrocki/CB-14048
CB-14048: (android) allowedSchemes check empty string fix
2 parents 5581957 + 57eda78 commit 33aff11

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/android/InAppBrowser.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,10 @@ else if (url.startsWith("sms:")) {
11141114
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
11151115
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]*://.*?$")) {
11161116
if (allowedSchemes == null) {
1117-
String allowed = preferences.getString("AllowedSchemes", "");
1118-
allowedSchemes = allowed.split(",");
1117+
String allowed = preferences.getString("AllowedSchemes", null);
1118+
if(allowed != null) {
1119+
allowedSchemes = allowed.split(",");
1120+
}
11191121
}
11201122
if (allowedSchemes != null) {
11211123
for (String scheme : allowedSchemes) {

0 commit comments

Comments
 (0)