Kallithea issues archive

Issue #241: Unicode exception while doing git push

Reported by: Janusz Harkot
State: closed
Created on: 2016-08-17 08:38
Updated on: 2018-01-20 21:04

Description

2016-08-17 10:30:49.665 ERROR [waitress] Exception when serving /xxxxx/info/refs
Traceback (most recent call last):
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/waitress/channel.py", line 337, in service
    task.service()
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/waitress/task.py", line 173, in service
    self.execute()
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/waitress/task.py", line 392, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/paste/gzipper.py", line 34, in __call__
    response.gzip_start_response)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/paste/cascade.py", line 130, in __call__
    return self.apps[-1](environ, start_response)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/paste/registry.py", line 379, in __call__
    app_iter = self.application(environ, start_response)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/middleware/wrapper.py", line 43, in __call__
    return self.application(environ, start_response)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/base.py", line 313, in __call__
    return self._handle_request(environ, start_response)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/middleware/simplegit.py", line 137, in _handle_request
    result = self.authenticate(environ)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/base.py", line 170, in authenticate
    if self.authfunc(username, password, environ) is not None:
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/auth_modules/__init__.py", line 414, in authenticate
    environ=environ or {})
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/auth_modules/__init__.py", line 233, in _authenticate
    user_data = self.auth(userobj, username, passwd, settings, **kwargs)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/auth_modules/auth_internal.py", line 89, in auth
    password_match = auth.KallitheaCrypto.hash_check(password, userobj.password)
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/kallithea/lib/auth.py", line 129, in hash_check
    return bcrypt.hashpw(password, hashed) == hashed
  File "/home/rhode/.virtualenvs/rhodecode/local/lib/python2.7/site-packages/bcrypt/__init__.py", line 61, in hashpw
    raise TypeError("Unicode-objects must be encoded before hashing")
TypeError: Unicode-objects must be encoded before hashing

working on the trunk version of kalithea

Attachments

Comments

Comment by Andrej Shadura, on 2016-08-17 09:20

Hi, could you please let me know the version you are using? I think I fixed this bug in the development branch recently.

Comment by Janusz Harkot, on 2016-08-23 10:24

changeset: 6100:3521120e72bc

version 0.3.99

Comment by Andrej Shadura, on 2017-06-28 20:30

Does this still happen to you?

Comment by Thomas De Schampheleire, on 2018-01-20 21:04

No feedback from submitter.