mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[GH-ISSUE #486] Redirect URLs without protocol schema are not handled correctly #175
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ebner on GitHub (Aug 21, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/486
Originally assigned to: @sadok-f on GitHub.
When requesting an image URL that redirects using 30x and a Location header without protocol, the redirect is not followed and the picture therefore not processed.
The problem can be observed by accessing this example URL: https://demo.flyimg.io/upload/w_120,h_90,c_1/https://prs-cdp-prod-webapiproxy.azurewebsites.net/api/glt/show/270RBod2QTiO0jVCqY5Pmg/image
The server replies with HTTP status 302 and Location "//images.ctfassets.net/ds6dz7ilx8up/1rbDbGZ5YXzZtOM4fwSjZu/df7de5e0f98e354fe7728bd12f55142b/callinaz-small.png?fit=pad&w=1000&h=1000"
The redirect should be followed by adding the missing protocol part before trying to fetch the data from the new location.
@sadok-f commented on GitHub (Aug 26, 2024):
Thank you @ebner for opening this issue.
I'll check it out asap.
@sadok-f commented on GitHub (Aug 27, 2024):
@ebner the issue is fixed in the latest release 1.4.5
thank you for reporting it.
@ebner commented on GitHub (Aug 28, 2024):
Thanks @sadok-f ! I deployed 1.4.5 to test it locally and I am receiving the following error message now when trying to load from this URL https://prs-cdp-prod-webapiproxy.azurewebsites.net/api/glt/show/270RBod2QTiO0jVCqY5Pmg/image:
The demo instance seems to load it without problems though: https://demo.flyimg.io/upload/w_120,h_90,c_1/https://prs-cdp-prod-webapiproxy.azurewebsites.net/api/glt/show/270RBod2QTiO0jVCqY5Pmg/image
@sadok-f commented on GitHub (Aug 28, 2024):
@ebner I think it caused by your config/parameters.yml file, since in the new version I changed the
header_extra_optionsoption from a string to an array.if that the case, please update your file and change the option to be like:
@ebner commented on GitHub (Aug 29, 2024):
You are right. It works now, thanks!
I had taken the initial configuration from here: https://github.com/flyimg/flyimg/blob/main/config/parameters.yml
In that configuration
header_extra_optionsis active by default. I can imagine that there are a lot of configurations out there that will experience the same problem as I had.@sadok-f commented on GitHub (Aug 29, 2024):
thanks for pointing this out, I'll work on a fix to prevent this from happening.