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.
   -->
   [email protected]
   
   
   ## 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to