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

[media] Downloading file with special characters in name leads to error: Failed - no file #6136

Closed
jesscall opened this issue Mar 4, 2020 · 1 comment · Fixed by #6137
Closed
Labels
Category: Bug PR or issue that aims to report or fix a bug

Comments

@jesscall
Copy link
Contributor

jesscall commented Mar 4, 2020

Describe the bug
There is an error when downloading files from media module that contain special characters in its name (ex: '&'). Error message that appears says "Failed - No File". This is likely occurring because SQL changes such characters to their html encoding.

To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):

  1. Go to media module.
  2. If no file with special characters (&, >, <, etc) is available, upload one yourself.
  3. Try downloading that file now.
  4. See error - Failed, no file.

What did you expect to happen?
File should download normally.

Browser Environment (please complete the following information):

  • OS: Ubuntu
  • Browser: Chrome

Server Environment (if known):
Note: We only support the most recent release of LORIS.

  • LORIS Version: 21.0 and (i suspect) onward
  • Linux distribution and Version: Ubuntu 16.04
  • MySQL/MariaDB Version: MySQL 5.7
@jesscall jesscall added the Category: Bug PR or issue that aims to report or fix a bug label Mar 4, 2020
@jesscall jesscall linked a pull request Mar 4, 2020 that will close this issue
@johnsaigle
Copy link
Contributor

There's a chance that this affects other modules with file download capabilities too.

laemtl pushed a commit to laemtl/Loris that referenced this issue Jun 2, 2020
This aims to fix a bug that was experienced by a CCNA user when trying to download a file that had a '&' in the name. SQL encodes strings containing special chars and thus we need to use the decoded file names in the path when downloading files from media module.

    Resolves aces#6136
laemtl pushed a commit to laemtl/Loris that referenced this issue Jun 2, 2020
This aims to fix a bug that was experienced by a CCNA user when trying to download a file that had a '&' in the name. SQL encodes strings containing special chars and thus we need to use the decoded file names in the path when downloading files from media module.

    Resolves aces#6136
@driusan driusan closed this as completed in 8a877df Jun 9, 2020
laemtl pushed a commit to laemtl/Loris that referenced this issue Jun 11, 2020
This aims to fix a bug that was experienced by a CCNA user when trying to download a file that had a '&' in the name. SQL encodes strings containing special chars and thus we need to use the decoded file names in the path when downloading files from media module.

    Resolves aces#6136
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug PR or issue that aims to report or fix a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants