You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/08/31 03:38:01 UTC

[GitHub] [cordova-android] erisu opened a new pull request #1332: fix(PluginManager): AllowBridgeAccess default policy to handle scheme & hostname

erisu opened a new pull request #1332:
URL: https://github.com/apache/cordova-android/pull/1332


   ### Motivation and Context
   
   fixes: #1328
   
   ### Description
   
   Update how the PluginManager handles the default policy.
   
   * If `AndroidInsecureFileModeEnabled` is `true`, then the default policy is `file://`
   * If `AndroidInsecureFileModeEnabled` is `false`, then the default policy is the combination of the `scheme` & `hostname`.
     * The default scheme is: `https`
     * The default hostname is: `localhost`
     * If the user changes any of these values, it will be used.
   
   ### Testing
   
   * Creating Project
   * Adding Platform
   * Adding Device Plugin
   * Changing `scheme` to `http`
   * Changing `hostname` to `apache.org`
   * Setting `AndroidInsecureFileModeEnabled` to `true`
   
   ### Additional Notes
   
   I also tested a solution that added the fix to the `AllowListPlugin` class. https://github.com/apache/cordova-android/commit/fa5b228bb9cefca36d92df3c80bb6bbc42672377
   
   This is where @NiklasMerz originally the code. The issue is that is was written in the config parser step. The config parser has not fully parse everything, e.g. the preferences, and therefore always picked the default values.
   
   If we wanted to keep the login inside the `AllowListPlugin` file, we would have to move it to the `pluginInitialize` method, after the config parser has been completed.
   
   The question really comes down to, where it should reside?
   
   * The `PluginManager`, is where the default policy is defined.
   * The `AllowListPlugin` is where we parse the user's custom-defined `allow-navigation`, `allow-intent`, `access`, and `content`.
   
   IMO the `PluginManager` sounded better. Previously the default policy was `file://` but since `WebViewAssetLoader` was added and default should now be `https://localhost`. But also, since users can change the launch URL to either file or default/custom scheme+hostname, it seems maybe the default policy should be a bit flexible.
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-android] codecov-commenter edited a comment on pull request #1332: fix(PluginManager): AllowBridgeAccess default policy to handle scheme & hostname

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1332:
URL: https://github.com/apache/cordova-android/pull/1332#issuecomment-908872046


   # [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1332](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ac36705) into [master](https://codecov.io/gh/apache/cordova-android/commit/dc4e065f619ce98d5c38211f5efd759d05959bec?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dc4e065) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/cordova-android/pull/1332/graphs/tree.svg?width=650&height=150&src=pr&token=q14nMf6C5a&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1332   +/-   ##
   =======================================
     Coverage   73.15%   73.15%           
   =======================================
     Files          21       21           
     Lines        1643     1643           
   =======================================
     Hits         1202     1202           
     Misses        441      441           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dc4e065...ac36705](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-android] codecov-commenter edited a comment on pull request #1332: fix(PluginManager): AllowBridgeAccess default policy to handle scheme & hostname

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1332:
URL: https://github.com/apache/cordova-android/pull/1332#issuecomment-908872046


   # [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1332](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ac36705) into [master](https://codecov.io/gh/apache/cordova-android/commit/dc4e065f619ce98d5c38211f5efd759d05959bec?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dc4e065) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/cordova-android/pull/1332/graphs/tree.svg?width=650&height=150&src=pr&token=q14nMf6C5a&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1332   +/-   ##
   =======================================
     Coverage   73.15%   73.15%           
   =======================================
     Files          21       21           
     Lines        1643     1643           
   =======================================
     Hits         1202     1202           
     Misses        441      441           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dc4e065...ac36705](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-android] erisu merged pull request #1332: fix(PluginManager): AllowBridgeAccess default policy to handle scheme & hostname

Posted by GitBox <gi...@apache.org>.
erisu merged pull request #1332:
URL: https://github.com/apache/cordova-android/pull/1332


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-android] codecov-commenter commented on pull request #1332: fix(PluginManager): AllowBridgeAccess default policy to handle scheme & hostname

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1332:
URL: https://github.com/apache/cordova-android/pull/1332#issuecomment-908872046


   # [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1332](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ac36705) into [master](https://codecov.io/gh/apache/cordova-android/commit/dc4e065f619ce98d5c38211f5efd759d05959bec?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dc4e065) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/cordova-android/pull/1332/graphs/tree.svg?width=650&height=150&src=pr&token=q14nMf6C5a&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1332   +/-   ##
   =======================================
     Coverage   73.15%   73.15%           
   =======================================
     Files          21       21           
     Lines        1643     1643           
   =======================================
     Hits         1202     1202           
     Misses        441      441           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dc4e065...ac36705](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-android] codecov-commenter commented on pull request #1332: fix(PluginManager): AllowBridgeAccess default policy to handle scheme & hostname

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1332:
URL: https://github.com/apache/cordova-android/pull/1332#issuecomment-908872046


   # [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1332](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ac36705) into [master](https://codecov.io/gh/apache/cordova-android/commit/dc4e065f619ce98d5c38211f5efd759d05959bec?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dc4e065) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/cordova-android/pull/1332/graphs/tree.svg?width=650&height=150&src=pr&token=q14nMf6C5a&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1332   +/-   ##
   =======================================
     Coverage   73.15%   73.15%           
   =======================================
     Files          21       21           
     Lines        1643     1643           
   =======================================
     Hits         1202     1202           
     Misses        441      441           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dc4e065...ac36705](https://codecov.io/gh/apache/cordova-android/pull/1332?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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