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

Removed base64_decode used against plaintext in downloadFile.php #3844

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomamoto
Copy link

This was resulting in either garbled filenames when trying to download attachments, or causing the server to outright refuse the download due URL-unfriendly characters. It seems self-evident by the use of the basename() that the 'name' and 'extension' fields are stored in plaintext in the {prefix}_files table, so I can only assume this was an oversight and that it's still in the code since 3.0.0 because few people use the attachments feature.

This was resulting in either garbled filenames when trying to download attachments, or causing the server to outright refuse the download due URL-unfriendly characters.  It seems self-evident by the use of the basename() that the 'name' and 'extension' fields are stored in plaintext in the {prefix}_files table, so I can only assume this was a oversight and that it's still in the code since 3.0.0 because few people use the attachments feature.
Also, added the "." into the latter argument of the basename() function, as otherwise an extra "." would be be left at the end of the resulting string.
@tomamoto
Copy link
Author

tomamoto commented Dec 7, 2023

@nilsteampassnet Is there some misunderstanding here? I sent this pull request a while back after it helped me fix an issue where my users were unable to download their attachments. I am able to accept being told I'm wrong or that my solution is inadequate. I would just appreciate some feedback at this point, even if the merge itself might now be outdated.

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.

1 participant