Project

General

Profile

Actions

Support #13410

closed

Group Library Add item with special characters in title

Added by scott voth about 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Group Library
Target version:
Start date:
2020-09-30
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

On Zendesk we had a case of a member trying to add a pdf with a special character in its title (for example: "Assignment # 2") and the upload created an empty file. Could/should we sanitize this behind the scenes?


Files

Wendy.png (102 KB) Wendy.png scott voth, 2020-09-30 04:39 PM
Actions #1

Updated by Boone Gorges about 4 years ago

  • Status changed from New to Reporter Feedback

Could you please spell out the steps to reproduce in a bit more detail? I assume this means that 'Assignment #2' is the text entered in the Title field, not that 'Assignment #2' is the filename of the PDF?

Actions #2

Updated by scott voth about 4 years ago

The name of the actual file was "Assignment #2.pdf"

Actions #3

Updated by scott voth about 4 years ago

This might help. See attached

Actions #4

Updated by Boone Gorges about 4 years ago

  • Target version set to 1.17.5

Thanks, Scott.

Putting the pieces together, it appears that this is a problem specific to the # character. The Group Library Vue application uses # for route navigation, and the presence of this character in group document URLs (format ?get_group_doc=123/assignment#2.pdf) was confusing the routing logic. The immediate problem is to URL-encode document URIs when building file links displayed in the Vue app, but this requires additional changes to our bp-group-documents customizations to ensure that the URL-encoded documents are decoded when you attempt to download the document. I've made these changes in https://github.com/cuny-academic-commons/cac/commit/7002974d6975298b227e4a72c961afe5255ed7a7 and deployed to the production site. I tried to verify by checking the library at https://commons.gc.cuny.edu/groups/seeing-thinking-and-writing-ethnographically/library/#/ - the link I got from your screenshot - but it looks like the user renamed the files. Perhaps you could verify the behavior yourself, or ask the reporter to test the fix.

Actions #5

Updated by scott voth about 4 years ago

Thanks Boone - I tested it with her original file and it is working fine now.

Actions #6

Updated by Boone Gorges about 4 years ago

  • Status changed from Reporter Feedback to Resolved

Great, thanks!

Actions

Also available in: Atom PDF