diff --git a/account/main.py b/account/main.py index ce037fd..989f553 100644 --- a/account/main.py +++ b/account/main.py @@ -2,8 +2,8 @@ import os import time import random +import hashlib import streamlit as st -from hashlib import sha256 from sendgrid import SendGridAPIClient from sendgrid.helpers.mail import Mail from account.loader import account_database_loader @@ -37,7 +37,7 @@ def send_email(subject, from_email, to_email, content): print("Error sending email:", str(e)) def add_user(email, username, password, confirm): - password = sha256(password.encode('utf-8')).hexdigest() + password = hashlib.md5(hashlib.sha256(password.encode('utf-8')).hexdigest().encode()).hexdigest() cursor.execute('''INSERT INTO users (email, username, password, confirm) VALUES (?, ?, ?, ?)''', (email, username, password, confirm)) sys_log("Created User Account", "Username: " + username + " Email: " + email) conn.commit() diff --git a/account/reliability.py b/account/reliability.py index 2f61857..903d557 100644 --- a/account/reliability.py +++ b/account/reliability.py @@ -1,7 +1,7 @@ -from hashlib import sha256 +import hashlib def get_user_reliability(cursor, username, password): - password = sha256(password.encode('utf-8')).hexdigest() + password = hashlib.md5(hashlib.sha256(password.encode('utf-8')).hexdigest().encode()).hexdigest() cursor.execute('SELECT password FROM users WHERE username = ?', (username,)) row = cursor.fetchone() diff --git a/database/users-account.db b/database/users-account.db index 0c4496d..e9a2fef 100644 Binary files a/database/users-account.db and b/database/users-account.db differ