You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by ktop <gi...@git.apache.org> on 2016/03/18 20:28:03 UTC

[GitHub] cordova-android pull request: CB-10897 Refactor URI Parsing for Wh...

GitHub user ktop opened a pull request:

    https://github.com/apache/cordova-android/pull/283

    CB-10897 Refactor URI Parsing for Whitelist

    Fix for CB-10897. 
    
    I moved out the code that parses the 'origin' from the whitelist to a separate function so that it can also be used to parse the URLs that request access instead of using Android's Uri class parse function. Android's Uri parse function does not parse 'host' the same way that Cordova parses the host in origin for whitelist, so host ends up being null and the comparison fails. Using the same parsing methods is the way to go to give accurate comparisons of URLs to those in the whitelist. 
    
    Also, I can have specific non http/https URLs in my whitelist now. 
    Something like this works now without the wildcard:
    <allow-intent href="market://details?id=com.google.android.apps.maps" />

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ktop/cordova-android CB-10897

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/283.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #283
    
----
commit 26662acada6f44a83c11c1e13faa8fea3a959720
Author: Karen Tran <kt...@gmail.com>
Date:   2016-03-18T18:45:57Z

    CB-10897 Refactor URI Parsing for Whitelist

----


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android issue #283: CB-10897 Refactor URI Parsing for Whitelist

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the issue:

    https://github.com/apache/cordova-android/pull/283
  
    This is closed as abandoned.  It's sad, because asking for tests shouldn't cause anything to become abandoned.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request #283: CB-10897 Refactor URI Parsing for Whiteli...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-android/pull/283


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-10897 Refactor URI Parsing for Wh...

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the pull request:

    https://github.com/apache/cordova-android/pull/283#issuecomment-200517498
  
    Can we have tests in the test project for this?  It looks fine, but since it's new functionality in cordova-android, adding a test would be good.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-10897 Refactor URI Parsing for Wh...

Posted by ktop <gi...@git.apache.org>.
Github user ktop commented on the pull request:

    https://github.com/apache/cordova-android/pull/283#issuecomment-200009843
  
    @infil00p can you take a look at this PR?


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-10897 Refactor URI Parsing for Wh...

Posted by ktop <gi...@git.apache.org>.
Github user ktop commented on the pull request:

    https://github.com/apache/cordova-android/pull/283#issuecomment-201509250
  
    @infil00p can you review again? see my previous comment. 


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android issue #283: CB-10897 Refactor URI Parsing for Whitelist

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the issue:

    https://github.com/apache/cordova-android/pull/283
  
    What's the status for this? I refactored the unit tests so we can actually have tests that back this code now, as opposed to before where it wasn't quite as straight forward.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-10897 Refactor URI Parsing for Wh...

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the pull request:

    https://github.com/apache/cordova-android/pull/283#issuecomment-204006738
  
    We should be able to unit test the methods on the Whitelist object itself without plugins.  I also don't see the commit where the test is.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-10897 Refactor URI Parsing for Wh...

Posted by ktop <gi...@git.apache.org>.
Github user ktop commented on the pull request:

    https://github.com/apache/cordova-android/pull/283#issuecomment-200991279
  
    I've added a test now. 
    
    Should we open another jira issue to update the Whitelist in the test project?
    It's still using the <access> tags in config.xml and in order to test my changes for the Whitelist tests, I had to manually add the whitelist plugin. Not sure if there's an easy way to pull down the latest Whitelist plugin and add it to the test project. Maybe it's a manual step we can document in the readme. 


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org