Modify ↓
      
Opened 19 years ago
Closed 19 years ago
#3527 closed defect (duplicate)
Cookie parser fails
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | general | Version: | devel | 
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
Occassionally this traceback appears in my server log:
          File "/home/trac/Run/trac/external.py", line 74, in __call__
            return self.application(environ, start_response)
          File "/home/trac/Run/trac/external.py", line 115, in tracApplication
            return trac.web.main.dispatch_request(environ, start_response)
          File "/home/trac/Projects/trac/trunk/trac/web/main.py", line 329, in dispatch_request
            req = Request(environ, start_response)
          File "/home/trac/Projects/trac/trunk/trac/web/api.py", line 133, in __init__
            self.incookie.load(cookie)
          File "/usr/lib/python2.4/Cookie.py", line 621, in load
            self.__ParseString(rawdata)
          File "/usr/lib/python2.4/Cookie.py", line 652, in __ParseString
            self.__set(K, rval, cval)
          File "/usr/lib/python2.4/Cookie.py", line 574, in __set
            M.set(key, real_value, coded_value)
          File "/usr/lib/python2.4/Cookie.py", line 453, in set
            raise CookieError("Illegal key value: %s" % key)
        Cookie.CookieError: Illegal key value: xml:lang
Afterwards, all requests fail with a SQLite OperationalError indicating that the database is locked.
Attachments (0)
  Note:
 See   TracTickets
 for help on using tickets.
    


  
This is a duplicate of #2256.
The name "xml:lang" is actually an invalid key for a cookie since it contains a ":" character. Thus, the built-in Trac cookie parser throws an exception.