Skip to content

stop decoding the file path twice for downloads - #7321

Open
dualfroz wants to merge 1 commit into
pterodactyl:1.0-developfrom
dualfroz:fix/5256-download-double-decode
Open

dualfroz wants to merge 1 commit into
pterodactyl:1.0-developfrom
dualfroz:fix/5256-download-double-decode

Conversation

@dualfroz

Copy link
Copy Markdown

the download endpoint ran rawurldecode() on file after laravel already decoded the query string, so a file literally named modernfix-forge-5.19.6%2Bmc1.20.1.jar ended up as ...+mc1.20.1.jar in the file_path claim and wings couldnt find it. contents and write dont do that second decode, so i dropped it here too. names without a % in them should behave the same as before. added a small test for the claim

Fixes #5256

laravel already decodes the `file` query param, the extra rawurldecode
turned a literal `%2B` in a name into `+`, so wings got a path that
does not exist. contents and write already pass the param as is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't download file with URL-encoded name

1 participant