Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

#10935 closed defect (duplicate)

Trac should read the REMOTE_USER as UTF-8

Reported by: bert Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Thijs Triemstra)

When Trac reads the REMOTE_USER from the environment it is not prepared for UTF-8 names (for example when the user is autheticated via SSL certificate and has a name with a german umlaut)

The property Request.remote_user() (in web/api.py) should read

    @property
    def remote_user(self):
        """ Name of the remote user.
        
        Will be `None` if the user has not logged in using HTTP authentication.
        """
        #return self.environ.get('REMOTE_USER')
        return unicode(self.environ.get('REMOTE_USER'), 'utf-8')

to avoid that. Otherwise the sqlite code used in Trac will brake and a backtrace instead of any webpage will be returned.

This is a one-line diff we had to apply on all Trac versions so far and also on 1.0 now.

Please integrate in the next version.

(Note that most other strings in the same file are treated as UTF-8 already)

Attachments (0)

Change History (2)

comment:1 by Thijs Triemstra, 12 years ago

Description: modified (diff)

comment:2 by Jun Omae, 12 years ago

Resolution: duplicate
Status: newclosed

a duplicate of #6318.

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.