Add missing GRID_SIZE option to example env and decrease to 15, add profile page with username and pattern change, add logout, fix clear buttons submitting, add Posts table for later use, prevent timing attacks during pattern equal check

This commit is contained in:
csd4ni3l
2025-10-23 15:51:22 +02:00
parent cc7f906000
commit 810b925387
9 changed files with 382 additions and 15 deletions

View File

@@ -1,4 +1,6 @@
import json
import json, random, time
systemrandom = random.SystemRandom()
class Pattern():
def __init__(self, data: list[tuple]):
@@ -19,4 +21,6 @@ class Pattern():
if not isinstance(value, Pattern):
return False
time.sleep(systemrandom.uniform(0.001, 0.5)) # prevent timing attacks
return set(self.data) == set(value.data)