Skip to content

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

Description

@usernuno

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions