From db8765a3c75a705954c78bac0c9e5e24aeb18d6d Mon Sep 17 00:00:00 2001 From: Fulgen301 Date: Sun, 16 Sep 2018 18:18:06 +0200 Subject: auth: Fix registration process --- routes/auth.py | 1 + 1 file changed, 1 insertion(+) (limited to 'routes') diff --git a/routes/auth.py b/routes/auth.py index 6c2e976..d6b6ffd 100644 --- a/routes/auth.py +++ b/routes/auth.py @@ -25,6 +25,7 @@ def post_auth_new(): hash = calculateUserHash(username, password).hexdigest() try: + session.query(User).filter(User.name == username or User.hash == hash).one() raise HTTPResponse("User already exists", status=409) except db.orm.exc.NoResultFound: session.add(User(name=username, hash=hash)) -- cgit v1.2.3-54-g00ecf