#8994 closed defect (invalid)
special symbols in milestones names, attachments, etc.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.11.5 |
Severity: | normal | Keywords: | needinfo unicode |
Cc: | ludvig@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I can create milestone with spaces in names and i also can add attachment to the ticket with spaces (or cyrillyc name) and everething works well, but when i trying to open that file or view milestone, i get an error: "Attachment 'ticket:6: preloader%202.swf' does not exist."
the Operating System is Linux 2.6.31-17-generic #54-Ubuntu SMP (Karmic) the Python version used Python 2.6.4 the database backend and their bindings if relevant SQLite for Trac 0.11.5
i'm using utf-8 charset
Attachments (0)
Change History (14)
comment:1 by , 15 years ago
Keywords: | needinfo unicode added |
---|---|
Summary: | soecial symbols in milestones names, attachments, etc. → special symbols in milestones names, attachments, etc. |
comment:2 by , 15 years ago
I can verify that this does indeed happen on Trac 0.12. (More specifically Trac 0.12 multirepos, r8877)
When visiting a milestone, it wants me to create a new milestone rather than edit the one I clicked.
Attachments all created through "add attachment" on the web UI. Varying browsers, mostly WebKit-based, running on OS X mainly.
Changing the %20
to a +
gives the same error but with the plus URL-encoded. That is to say, going to http://trac/attachment/ticket/411/Photo+123.jpg
gives the error
Attachment 'ticket:411: Photo%2b.jpg' does not exist.
comment:3 by , 15 years ago
Cc: | added |
---|
comment:4 by , 15 years ago
Well, neither you nor the original reporter told us which web front-end are involved here.
Again, if it's tracd then the --unquote
parameter could help (it does when tracd is used through AJP).
See the output of tracd --help
.
comment:5 by , 15 years ago
ok, i will try. i can't switch to 11.6 now, cause i'd prefer to use version from repo (ubuntu karmic). I'm using fcgi? so please, can you tell me how can i use that param with fcgi? As web server i'm using nginx.
comment:7 by , 15 years ago
As for the configuration of nginx, here's how our looks:
location / { include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param AUTH_USER $remote_user; fastcgi_param PATH_INFO $path_info; fastcgi_pass trac; }
comment:8 by , 15 years ago
my conf abit more complex
location / { # socket address fastcgi_pass unix:/var/trac/mmg/run/instance.sock; # python - wsgi specific fastcgi_param HTTPS on; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # for authentication to work fastcgi_param AUTH_USER $remote_user; fastcgi_param REMOTE_USER $remote_user; }
comment:9 by , 15 years ago
I also experience this problem.
Adding a attachment with spaces, works fine. But accessing the attachment with spaces does not work:
Attachment 'ticket:10632: Birgit%20hes%20.jpg' does not exist.
I traced to the sql statement still containing the url encode stuff:
#The query as executed by trac mysql> SELECT filename,description,size,time,author,ipnr FROM attachment WHERE type='ticket' AND id='10513' AND filename='Screen%20shot%202010-03-08%20at%209.25.00%20AM.png' ORDER BY time; Empty set (0.00 sec) #the attachments for the ticket. mysql> SELECT filename,description,size,time,author,ipnr FROM attachment WHERE type='ticket' AND id='10513' ORDER BY time; +------------------------------------------+-------------+--------+------------+--------+----------------+ | filename | description | size | time | author | ipnr | +------------------------------------------+-------------+--------+------------+--------+----------------+ | mail.jpg | | 175139 | 1266836177 | jeroen | 192.168.13.143 | | Screen shot 2010-03-08 at 9.25.00 AM.png | | 75455 | 1268037792 | boris | 192.168.13.88 | +------------------------------------------+-------------+--------+------------+--------+----------------+ 2 rows in set (0.00 sec) mysql>
comment:11 by , 15 years ago
Does anyone have success with that ticket? nginx + fastcgi installation. Ubuntu Karmic Trac from repository 11.5
comment:13 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:14 by , 11 years ago
I'm running Trac 0.12 on Apache with mod_cgi. If I create milestone with cyrillic symbols in title, then I click on it I get error "wrong url format". On standalone server all works fine. How to fix it?
First try to upgrade to 0.11.6. Then if the problem persists, provide detailed steps for reproducing the issue with milestones: what exact name, how did you create it (admin panel, trac-admin command-line or Roadmap…).
Milestones with spaces or unicode content are supposed to work fine, the only situation I can think about where there could be a problem is for the extra encoding if you happen to use tracd through AJP, without using the
--unquote
param…