cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clelland <...@git.apache.org>
Subject [GitHub] cordova-android pull request: Allow subdomains flag in Whitelist x...
Date Wed, 19 Mar 2014 19:58:59 GMT
Github user clelland commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/95#discussion_r10768518
  
    --- Diff: framework/src/org/apache/cordova/Whitelist.java ---
    @@ -136,6 +136,14 @@ public void addWhiteListEntry(String origin, boolean subdomains)
{
                             } else {
                                 whiteList.add(new URLPattern(scheme, host, port, path));
                             }
    +
    +                        if( subdomains ){
    +                            // Support the `subdomains="true"` XML attribute in the whitelist
    +                            if( scheme == null) scheme = "";
    +                            String sub = scheme + "*." + host;
    +                            addWhiteListEntry(sub, false);
    --- End diff --
    
    Why the recursive call here? I think this drops the port (which might be important) and
path (which probably isn't, but you never know)
    
    Couldn't this just call whiteList.add with a modified host?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message