Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#8994 closed defect (invalid)

special symbols in milestones names, attachments, etc.

Reported by: zaynyatyi@… 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 Christian Boos, 15 years ago

Keywords: needinfo unicode added
Summary: soecial symbols in milestones names, attachments, etc.special symbols in milestones names, attachments, etc.

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…

comment:2 by lericson, 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 anonymous, 15 years ago

Cc: ludvig@… added

comment:4 by Christian Boos, 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 anonymous, 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:6 by Ludvig Ericson <ludvig@…>, 15 years ago

We use nginx and FastCGI.

comment:7 by Ludvig Ericson <ludvig@…>, 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 anonymous, 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 jos@…, 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:10 by jos@…, 15 years ago

My setup is nginx + fastcgi

comment:11 by anonymous, 15 years ago

Does anyone have success with that ticket? nginx + fastcgi installation. Ubuntu Karmic Trac from repository 11.5

comment:12 by zaynyatyi@…, 15 years ago

works when using fastcgi_param PATH_INFO $fastcgi_script_name;

comment:13 by zaynyatyi@…, 15 years ago

Resolution: invalid
Status: newclosed

comment:14 by anonymous, 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?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.