Skip to content

expected sha256_crypt hash, got sha256_crypt config string instead #6

Description

@aforamitdev

@app.route('/login',methods=['GET','POST'])
def login():
if request.method=='POST':
username=request.form['username']
password_candidate=request.form['password']
cur=mysql.connection.cursor()
#cursore creat
result=cur.execute('SELECT * FROM users WHERE username = %s',[username])

  if  result > 0:
      data = cur.fetchone()
      passwor=data['password']
      #comop
      if sha256_crypt.verify(password_candidate,passwor):
       app.logger.info('password match')
      else:
       app.logger.info('password no  match')

       return render_template(url_for('myaccount.html'))
  else:
       app.logger.info('no user')

return render_template('login.html')

error when trying to login :ValueError: expected sha256_crypt hash, got sha256_crypt config string instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions