Skip to content

Special characters in filename lead to no downloadable file #57

@univietw

Description

@univietw

How to reproduce:

  • Upload a file with a "?" in it's filename in a new activity
  • click on "download"
    you get an error like this
    error

What I found out:

  1. It seems like your plugin is using some old columns but I couldn't find them in the db/install.xml anymore. I'd encourage you to at least add this column to the install.xml so you don't get some not helpful db-Errors while debugging
  2. the Filename is not encoded. This leads to the following procedure:
    pluginfile.php/${number}/mod_pdfannotator/content/0/iseverybodythere?.pdf?forcedownload=1
    the browser interpretates the first "?" as the end of the url and the .pdf as the first parameter

I will push a pull request to fix this issue. This probably also applies to all other http special characters like "&" or "(", but I have not tested it.

Problem 1) is still not fixed by me because I have no idea whatsoever if this code is still needed or how to fix it. (see lib.php:386-395)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions