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/12 09:08:01 UTC
[GitHub] [cordova-android] YCKang opened a new issue #1322: The AllowList plugin may throw a NullPointerException in some case
YCKang opened a new issue #1322:
URL: https://github.com/apache/cordova-android/issues/1322
# Bug Report
## Problem
The AllowList plugin may throw a NullPointerException in some case.
### What is expected to happen?
To check the url correctly.
### What does actually happen?
Throw NullPointerException error.
## Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
If you don't set any `<allow-navigation>` in the config.xml, `this.shouldAllowNavigation(url)` will return `null`.
And operator '||' cannot be applied to 'null', 'boolean', it will throw NullPointerException error.
L130 should be `return (Boolean.TRUE.equals(this.shouldAllowNavigation(url)) || this.allowedRequests.isUrlAllowListed(url)) `.
https://github.com/apache/cordova-android/blob/bedb4427f420157ac547588acdf1083e8e916e20/framework/src/org/apache/cordova/AllowListPlugin.java#L122-L133
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
cordova-android@10.0.1
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [X] I searched for existing GitHub issues
- [X] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
--
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] breautek commented on issue #1322: The AllowList plugin may throw a NullPointerException in some case
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1322:
URL: https://github.com/apache/cordova-android/issues/1322#issuecomment-912798269
PR is welcome
--
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] jskrepnek commented on issue #1322: The AllowList plugin may throw a NullPointerException in some case
Posted by GitBox <gi...@apache.org>.
jskrepnek commented on issue #1322:
URL: https://github.com/apache/cordova-android/issues/1322#issuecomment-915495887
If I understand this right, it would mean that any allowed requests that are not also in allowed navigations will always fail. I'm able to reproduce this, even if there are some `allow-navigation` tags, for any requests that are also not in allowed navigations, even if they are in allowed requests.
--
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 closed issue #1322: The AllowList plugin may throw a NullPointerException in some case
Posted by GitBox <gi...@apache.org>.
erisu closed issue #1322:
URL: https://github.com/apache/cordova-android/issues/1322
--
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