From a87eb14ebc2044a8bcfe0e1830fa1b40c1cae7fb Mon Sep 17 00:00:00 2001 From: BlenderDumbass Date: Fri, 29 Nov 2024 16:48:40 +0200 Subject: [PATCH] slightly stronger email protection --- modules/Render.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/Render.py b/modules/Render.py index ae6d04d..fce0344 100644 --- a/modules/Render.py +++ b/modules/Render.py @@ -14,6 +14,8 @@ from modules import Set from modules import markdown from modules.Common import * +KnownCookies = [] + def guess_type(path): if "/json/" in path or ".json" in path: @@ -37,7 +39,9 @@ def headers(server, code): server.send_header("Content-type", guess_type(server.path)) if not server.cookie: - server.send_header("Set-Cookie", "temp_id="+RandString()) + cookie = RandString() + KnownCookies.append(cookie) + server.send_header("Set-Cookie", "temp_id="+cookie) server.end_headers() @@ -691,7 +695,7 @@ def AccountPage(server, account): html = html + '' # Protecting emails and stuff from scrubbers - if len(str(server.cookie)) == 50: + if server.cookie in KnownCookies: # Website