flask-bcrypt - ValueError: Invalid salt

后端 未结 11 1505
北海茫月
北海茫月 2020-12-29 07:57

I was finishing up a simple user login with Flask and flask-Bcrypt. However, when trying to login with a user that is stored in my database, I keep getting this error

<
11条回答
  •  误落风尘
    2020-12-29 08:25

    Basically you would like to encode your data before the hash: password.encode('utf-8'). If it comes as unicode it may raise errors. Have a look here also: https://github.com/maxcountryman/flask-bcrypt/issues/9

提交回复
热议问题