Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

typo at utils.encrypt_password #3

Closed
ifduyue opened this Issue · 1 comment

2 participants

@ifduyue

from https://github.com/peterbe/tornado-utils/blob/master/tornado_utils/utils.py#L46

def encrypt_password(raw_password, log_rounds=10):
    if not bcrypt:
        raise SystemError("bcrypt could no be imported")
    salt = bcrypt.gensalt(log_rounds=log_rounds)
    hsh = bcrypt.hashpw(raw_password, salt)
    algo = 'bcrypt'
    return u'%s$bcrypt$%s' % (algo, hsh)

since algo is "bcrypt" and "bcrypt" alreay in the string.
is it return u'%s$%s$%s' % (salt, algo, hsh) ?

@peterbe peterbe referenced this issue from a commit
@peterbe fix for issue/#3 e432b12
@peterbe
Owner

Fixed
e432b12

@peterbe peterbe closed this
@ifduyue ifduyue referenced this issue from a commit
@ifduyue ifduyue Merge branch 'master' of git://github.com/peterbe/tornado-utils
* 'master' of git://github.com/peterbe/tornado-utils:
  fix for issue/#3
a9a86d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.