Opened 4 months ago

#5495 new defect

trac.openstreetmap.org auth issues for users with unicode characters in their OSM username

Reported by: donal.hunt@… Owned by: tom@…
Priority: minor Milestone:
Component: admin Version:
Keywords: trac, auth, unicode Cc:

Description

Example username: dónal
URL: https://trac.openstreetmap.org/login

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/api.py", line 514, in send_error
    data, 'text/html')
  File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 968, in render_template
    message = Markup(req.session.pop('chrome.%s.%d'
  File "/usr/lib/python2.7/dist-packages/trac/web/api.py", line 316, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 268, in _get_session
    return Session(self.env, req)
  File "/usr/lib/python2.7/dist-packages/trac/web/session.py", line 210, in __init__
    self.promote_session(sid)
  File "/usr/lib/python2.7/dist-packages/trac/web/session.py", line 269, in promote_session
    (sid, self.req.authname))]
  File "/usr/lib/python2.7/dist-packages/trac/db/util.py", line 121, in execute
    cursor.execute(query, params)
  File "/usr/lib/python2.7/dist-packages/trac/db/util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 78, in execute
    result = PyFormatCursor.execute(self, *args)
  File "/usr/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 56, in execute
    args or [])
  File "/usr/lib/python2.7/dist-packages/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings

It looks like openstreetmap is using a very old version of TRAC so this may be fixed in a newer version.

Change History (0)

Note: See TracTickets for help on using tickets.