Skip to content

Commit

Permalink
Forced all input (email and username) to the server to be lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
n1lby73 authored Dec 20, 2023
1 parent ac0fec6 commit 99f0001
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions web-ui/webApp/apiRoute.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def __init__(self):
def post(self):

args = self.parser.parse_args()
email = args["email"]
email = args["email"].lower()
password = args["password"]

try:
Expand Down Expand Up @@ -324,8 +324,8 @@ def __init__(self):
def post(self):

args = self.parser.parse_args()
email = args["email"]
username = args["username"]
email = args["email"].lower()
username = args["username"].lower()
password = args["password"]

existingUserName = users.query.filter_by(username=username).first()
Expand Down Expand Up @@ -393,7 +393,7 @@ def post(self):

args = self.parser.parse_args()
user_otp = args["otp"]
email = args["email"]
email = args["email"].lower()

logged_user = users.query.filter_by(email=email).first()

Expand Down Expand Up @@ -458,8 +458,8 @@ def put(self):
global genOtpStartTime

args = self.parser.parse_args()
updatedEmail = args["newEmail"]
email = args["email"]
updatedEmail = args["newEmail"].lower()
email = args["email"].lower()


logged_user = users.query.filter_by(email=email).first()
Expand Down Expand Up @@ -522,7 +522,7 @@ def get(self):
global genOtpStartTime
args = self.parser.parse_args()

email = args["email"]
email = args["email"].lower()

logged_user = users.query.filter_by(email=email).first()

Expand Down Expand Up @@ -631,7 +631,7 @@ def get(self):

self.parser.add_argument("email", required=True)
args = self.parser.parse_args()
email = args["email"]
email = args["email"].lower()

logged_user = users.query.filter_by(email=email).first()

Expand Down Expand Up @@ -834,8 +834,8 @@ def __init__(self):
def put(self):

args = self.parser.parse_args()
userEmail = args["email"]
newRole = args["role"]
userEmail = args["email"].lower()
newRole = args["role"].lower()

user = get_jwt_identity()
email = user["email"]
Expand Down Expand Up @@ -891,7 +891,7 @@ def __init__(self):
def delete(self):

args = self.parser.parse_args()
userEmail = args["email"]
userEmail = args["email"].lower()

user = get_jwt_identity()
role = user["role"]
Expand Down Expand Up @@ -976,4 +976,4 @@ def get(self):
api.add_resource(resetPasswordApi, '/api/resetpass', '/api/resetpass/')
api.add_resource(verifyEmailApi, '/api/verifyemail', '/api/verifyemail/')
api.add_resource(resetOutTokenApi, '/api/resetouttoken', '/api/resetouttoken/')
api.add_resource(synchardchangesApi, '/api/synchardchanges', '/api/synchardchanges/')
api.add_resource(synchardchangesApi, '/api/synchardchanges', '/api/synchardchanges/')

0 comments on commit 99f0001

Please sign in to comment.