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

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

Open
grugnog opened this issue Aug 25, 2021 · 0 comments
Open

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

grugnog opened this issue Aug 25, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@grugnog
Copy link
Member

grugnog commented Aug 25, 2021

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.

@grugnog grugnog added the bug Something isn't working label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant