slightly stronger email protection

This commit is contained in:
BlenderDumbass 2024-11-29 16:48:40 +02:00
parent 9ff45581d9
commit a87eb14ebc

View file

@ -14,6 +14,8 @@ from modules import Set
from modules import markdown from modules import markdown
from modules.Common import * from modules.Common import *
KnownCookies = []
def guess_type(path): def guess_type(path):
if "/json/" in path or ".json" in 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)) server.send_header("Content-type", guess_type(server.path))
if not server.cookie: 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() server.end_headers()
@ -691,7 +695,7 @@ def AccountPage(server, account):
html = html + '</center>' html = html + '</center>'
# Protecting emails and stuff from scrubbers # Protecting emails and stuff from scrubbers
if len(str(server.cookie)) == 50: if server.cookie in KnownCookies:
# Website # Website