Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry added to allowedNavigations for the WebViewAssetLoader disregards logic from preferences #1343

Closed
3 tasks done
usernuno opened this issue Sep 10, 2021 · 1 comment
Closed
3 tasks done

Comments

@usernuno
Copy link

Bug Report

The change that adds an entry to allowedNavigations for the added WebViewAssetLoader disregards logic from preferences.

Problem

The problem is in the change introduced here: #1275

The CordovaPreferences object is never filled, so it has no keys/values. Therefore lines 87 and 88 in the diff above always use the default values.

In the end, no matter the values of preferences AndroidInsecureFileModeEnabled and hostname, https://localhost is always added to the allowedNavigations.

What is expected to happen?

Only when AndroidInsecureFileModeEnabled is false, should an entry be added to allowedNavigations. That entry must use the value from hostname when provided.

At least it was what I could gather from the code.

What does actually happen?

https://localhost is always added to the allowedNavigations, and no entry based on hostname is added.

Version information

Cordova-android 10.1.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@usernuno usernuno changed the title Entry added to allowedNavigations for the WebViewAssetLoader disregards logic from preferences Entry added to allowedNavigations for the WebViewAssetLoader disregards logic from preferences Sep 10, 2021
@jcesarmobile
Copy link
Member

It was fixed here
#1332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants