Edgewall Software
Modify

Opened 15 years ago

Closed 13 years ago

Last modified 11 years ago

#8425 closed defect (duplicate)

Unable to use $USER in default query in config for user names with non ascii letters

Reported by: jan.gorski@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11.1
Severity: normal Keywords: unicode verify
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

If user name contains some UTF characters (e.g. UTFęąó) and default query uses $USER, error is displayed in default query for this user:

Oops...

Trac detected an internal error:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 24-26: ordinal not in range(128)

Might be related to #6318, but after reading that ticket I am not sure.

Attachments (0)

Change History (5)

comment:1 by Christian Boos, 15 years ago

Well, #6318 shows that non-ascii characters for user names is not supported, so using them nevertheless exposes to lots of trouble, like risking to get non-UTF8 data in your database.

Which database backend are you using, btw?

comment:2 by jan.gorski@…, 15 years ago

$ sqlite3 —version 3.5.9 $ file trac.db trac.db: SQLite 3.x database

It is quite intersting. It does not depend on DB. There is no ticket for this user in db, and if I enter query manually, then it works, e.g.

http://wros124x/test/query?status=accepted&status=assigned&status=blocked&status=new&status=reopened&order=priority&col=id&col=summary&col=status&col=type&col=milestone&col=component&owner=UTF%C4%85%C4%99%C3%B3

Works correctly, and is direct equivalent of default query set in trac.ini:

default_query = status!=closed&owner=$USER

comment:3 by jan.gorski@…, 15 years ago

PS. I am able to log in. Error shows up after loggin in.

comment:4 by Christian Boos, 15 years ago

Keywords: unicode verify added
Milestone: 0.12.1

comment:5 by Christian Boos, 13 years ago

Milestone: next-minor-0.12.x
Resolution: duplicate
Status: newclosed

The problem described here must be derived from #6318 (i.e. the fact that non-ascii user names are not supported in the first place).

Regarding comment:3, the login might work by chance, if the authentication information happen to be stored with the same encoding as the encoded login name, but as soon as we try to make use of this name in the rest of Trac, we have encoding issues.

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.