Opened 18 years ago
Closed 18 years ago
#4837 closed defect (worksforme)
Unable to download attachments containing spaces in their filename
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | ticket system | Version: | 0.10.3 |
Severity: | normal | Keywords: | attachment |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
As discussed on #trac, we're currently unable to download attachments which contain spaces (and possibly other CGI escaped chars). For example:
Ticket URL:
http://dev.rubyonrails.org/ticket/6175
Attachment URL:
Contents of the directory:
$ gls /home/dev.rubyonrails.org/tracs/rails/attachments/ticket/6175/ 6175_flash_update_and_filter_chain%2Btests_r5270.diff 6175_flash_update_etc.diff actionpack_test_sweep_after_halted_filter_chain.diff 6175_flash_update_and_filter_chain%2Btests.diff actionpack_test_flash_update.diff sweep_flash_in_before_filters_v2.diff
Files without 'special' chars in their names are working fine.
Attachments (0)
Change History (6)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
type | id | filename | size | time | description | author | ipnr --------+------+------------------------------------------------------+------+------------+-------------------------------+--------+--------------- ticket | 6175 | sweep_flash_in_before_filters_v2.diff | 1561 | 1158043880 | patch | caio | 201.52.81.228 ticket | 6175 | actionpack_test_flash_update.diff | 1249 | 1158072982 | tests for the silly flash bug | caio | 201.52.81.228 ticket | 6175 | actionpack_test_sweep_after_halted_filter_chain.diff | 1387 | 1158076025 | test | caio | 201.52.81.228 ticket | 6175 | 6175_flash_update_and_filter_chain+tests.diff | 3976 | 1158076185 | all together now | caio | 201.52.81.228 ticket | 6175 | 6175_flash_update_and_filter_chain+tests_r5270.diff | 5296 | 1160380486 | revised patch | caio | 201.52.51.50 ticket | 6175 | 6175_flash_update_etc.diff | 5331 | 1172363694 | Reattachment of ghost patch. | nzkoz | 10.71.165.102
That's the dump from the relevant ticket, it appears correct to me.
comment:3 by , 18 years ago
Can you enable debug logging and check for lines like this:
2007-02-25 16:19:44,599 Trac[attachment] DEBUG: Trying to open attachment at ../env/stable/attachments/ticket/1/6175_flash_update_and_filter_chain%2Btests_r5270.diff
Check for any exceptions near here.
And I assume the permissions on those files are okay?
comment:4 by , 18 years ago
Keywords: | attachment added |
---|
Well, on the same ticket:
6175_flash_update_and_filter_chain+tests.diff
works fine (check).
So there's nothing wrong here with the "+" and its URL encoding.
Must be a permission issue for the 6175_flash_update_and_filter_chain%2Btests_r5270.diff file.
comment:5 by , 18 years ago
Priority: | normal → low |
---|
It would appear to have been some kind of encoding problem. The postgres database was created as LATIN 1, and the data was rsynced over. We dumped, iconv'd and reloaded thhe databases, and everything's working now.
comment:6 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I'm not able to replicate this on 0.10.3…
Attachment directory:
Can you check your Trac database has the correct filenames?
Mine are: