Skip to content

Replace protocol as well as hostname when generating download URLs #412

@grugnog

Description

@grugnog

https://github.com/GetDKAN/dkan2/blob/master/modules/dkan_common/src/UrlHostTokenResolver.php#L18 replaces the hostname, but not the protocol. This means that files uploaded over http will be served over http and the same for https, even if the host serving the files is using the opposite protocol. This can cause insecure links on https servers (that have moved from http) or broken links if a server used to support https but no longer does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions