Skip to content

Commit

Permalink
CB-14048: (android) allowedSchemes check empty string fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Apr 26, 2018
1 parent 5581957 commit 57eda78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,10 @@ else if (url.startsWith("sms:")) {
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]*://.*?$")) {
if (allowedSchemes == null) {
String allowed = preferences.getString("AllowedSchemes", "");
allowedSchemes = allowed.split(",");
String allowed = preferences.getString("AllowedSchemes", null);
if(allowed != null) {
allowedSchemes = allowed.split(",");
}
}
if (allowedSchemes != null) {
for (String scheme : allowedSchemes) {
Expand Down

0 comments on commit 57eda78

Please sign in to comment.