Modify ↓
      
        Opened 18 years ago
Closed 17 years ago
#2679 closed defect (duplicate)
Special characters in passwords provoke an internal error
| Reported by: | Owned by: | Matt Good | |
|---|---|---|---|
| Priority: | normal | Component: | AccountManagerPlugin | 
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.10 | 
Description
Description
When adding a new user, if the password contains special characters Trac gives an internal error.
Steps to reproduce
- Go to the "Users" administration page;
- Create a new user, name="foo", pasword="é";
Version information
- Trac: 0.10.4
- TracAccountManager: 0.1.3dev
- Python: 2.5
- Firefox: 2.0.0.6 on Linux
Additional information
I get the following traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/webadmin/web_ui.py", line 119, in process_request
    path_info)
  File "build/bdist.linux-i686/egg/acct_mgr/admin.py", line 48, in process_admin_request
    return self._do_users(req)
  File "build/bdist.linux-i686/egg/acct_mgr/admin.py", line 95, in _do_users
    _create_user(req, self.env, check_permissions=False)
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 53, in _create_user
    mgr.set_password(user, password)
  File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 98, in set_password
    if self.password_store.set_password(user, password):
  File "build/bdist.linux-i686/egg/acct_mgr/htfile.py", line 55, in set_password
    self.userline(user, password))
  File "build/bdist.linux-i686/egg/acct_mgr/htfile.py", line 174, in userline
    return self.prefix(user) + htdigest(user, self.realm, password)
  File "build/bdist.linux-i686/egg/acct_mgr/pwhash.py", line 100, in htdigest
    p = ':'.join([user, realm, password])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
    Attachments (0)
Note: See
        TracTickets for help on using
        tickets.
    



Looks like a dup of #2327.