Opened 20 years ago
Closed 20 years ago
#1112 closed defect (fixed)
attachments with spaces in filename
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | general | Version: | 0.8 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
hi,
when clicking the ticket link to view/download an attachment with a space or other special character in the file name, Trac fails with an "attachment not found" error, though the attachment exists on the filesystem.
this would appear to be because the filename still contains URL encoded components, and File.py doesn't unescape the filename it gets.
i've created a patch that works here, though i'm not sure that its at the correct place, perhaps the unescaping should occur earlier.
Attachments (2)
Change History (5)
by , 20 years ago
Attachment: | trac-0.8-attachments.patch added |
---|
comment:1 by , 20 years ago
woops,
it seems that quoting occurs explicitly just before that line, sorry :)
is it new behaviour in 0.8 to always URL encode the file name, even on the filesystem? all our existing tickets created with 0.7.1 (with a few hundred attachments) still use raw unencoded filenames on the filesystem, an upgrade didn't seem to fix this..
by , 20 years ago
Attachment: | trac-0.8-attachments-r2.patch added |
---|
updated version of patch which allows encoded and unencoded filename (bit of a HACK)
comment:2 by , 20 years ago
Milestone: | → 0.9 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
I guess we should just fallback to unquoted filenames if the quoted version isn't found.
patch to fix viewing of attachments with spaces in the filename