From 7fcd2b8aa6ebcf2074ad4fadc92a33162d704e42 Mon Sep 17 00:00:00 2001 From: Ronan Date: Thu, 31 Aug 2023 16:26:48 +1000 Subject: [PATCH] Fix case sensitivity for duplicate username creation --- powerdnsadmin/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerdnsadmin/models/user.py b/powerdnsadmin/models/user.py index e989aa0..f1673a5 100644 --- a/powerdnsadmin/models/user.py +++ b/powerdnsadmin/models/user.py @@ -408,7 +408,7 @@ class User(db.Model): Create local user witch stores username / password in the DB """ # check if username existed - user = User.query.filter(User.username == self.username).first() + user = User.query.filter(User.username.lower() == self.username.lower()).first() if user: return {'status': False, 'msg': 'Username is already in use'}