This commit is contained in:
Morten Delenk 2016-06-12 18:32:13 +02:00
parent 5274b1968e
commit 770390b635

View file

@ -17,16 +17,16 @@ try:
checkstr=list("".join(random.choice(string.digits+string.ascii_lowercase) for _ in range(5)))
if not checkstr == form["checkstr"].value:
print("Captcha's wrong")
raise Exception()
raise SyntaxError()
username=form["username"].value
message=form["message"].value
timestamp=int(time.time())
data={"name":"","markdown":message,"author":username,"date":timestamp}
storage.append("comments-%i"%aid,data)
except:
traceback.print_exc()
except SyntaxError:
pass
seed=random.SystemRandom().randint(0,2**24)
random.seed(seed)
checkstr=list("".join(random.choice(string.digits+string.ascii_lowercase) for _ in range(5)))