From d5f3f369bf4ca8b5dfcefaffed26e39c5218765a Mon Sep 17 00:00:00 2001 From: Chris Frohoff Date: Tue, 2 Feb 2016 09:19:08 -0800 Subject: [PATCH] fix for lowercase comparison bug --- CTFd/challenges.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTFd/challenges.py b/CTFd/challenges.py index c8d15fa..1bda413 100644 --- a/CTFd/challenges.py +++ b/CTFd/challenges.py @@ -138,7 +138,7 @@ def chal(chalid): for x in keys: if x['type'] == 0: #static key print(x['flag'], key.strip().lower()) - if x['flag'] == key.strip().lower(): + if x['flag'] and x['flag'].strip().lower() == key.strip().lower(): solve = Solves(chalid=chalid, teamid=session['id'], ip=request.remote_addr, flag=key) db.session.add(solve) db.session.commit()