mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[GH-ISSUE #481] Special Characters in urls #177
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#177
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 @TimWeyand on GitHub (Jul 26, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/481
Originally assigned to: @sadok-f on GitHub.
Describe the bug
If the source image has a special character in the url, the operation results in an Exception in /src/Core/Entity/Image/InputImage.php:114 . Its technically not wanted to have special characters like a space, but non technical personal, sometimes upload it anyways
To Reproduce
load an image with an special character like %20 (space). In php it will be converted to " ", which causes the error.
Expected behavior
parts of the url previously url encoded, should be url encoded on the way out.
@sadok-f commented on GitHub (Jul 26, 2024):
Thank you @TimWeyand for reporting this issue.
I'll check it out and get back to you.
@sadok-f commented on GitHub (Jul 28, 2024):
Hi @TimWeyand could you please provide more details about the issue?

Ideally, it should be a concrete example of an image URL with a special character.
Flyimg should handle URL encoded source images, as some source endpoint require some parameters.
Here my testing of a local image with space encoded (%20):
@TimWeyand commented on GitHub (Jul 28, 2024):
Hi @sadok-f,
thank you for checking this issue! 🙂
Here are three examples (one working control - two not working examples):
Working request:
control:
flyimg:
Just Spaces (failed) request:
control:
flyimg:
Just weird filename:
control:
flyimg:
@TimWeyand commented on GitHub (Aug 5, 2024):
@sadok-f I have added an (unpretty) method to rawurlencode() parts of the url which could cause problems.
@sadok-f commented on GitHub (Aug 12, 2024):
Sorry @TimWeyand for not answering you, I'm currently on vacation until the end of August.
As soon as I get back I will check it out.
Thank you.
@sadok-f commented on GitHub (Aug 27, 2024):
fixed in #483