Made email protection a tit bit stronger

This commit is contained in:
BlenderDumbass 2024-12-06 16:24:10 +02:00
parent 7750afc5b9
commit 1bce88a78e
2 changed files with 10 additions and 4 deletions

BIN
icons/download.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -19,6 +19,7 @@ from modules.Common import *
KnownCookies = []
ProbablyHumanCookies = []
RecentArticles = {}
RefferedArticles = {}
ProblematicRefreshes = []
@ -809,7 +810,7 @@ def AccountPage(server, account):
html = html + '</center>'
# Protecting emails and stuff from scrubbers
if server.cookie in KnownCookies:
if server.cookie in ProbablyHumanCookies:
# Website
@ -1439,7 +1440,7 @@ def EditorPage(server):
petition = article.get("petition", {})
petition_goal = petition.get("goal", "")
petition_api = petition.get("api", {}).get("api", "")
petition_api_key = petition.get("api", {}).get("keys", [])
petition_api_key = petition.get("api", {}).get("keys", [""])
petition_api_title = petition.get("api", {}).get("title", "")
petition_api_link = petition.get("api", {}).get("link", "")
@ -1569,7 +1570,7 @@ def ArticlePreview(article, Tabs, cookie=""):
except:
frac = 0
html = html + ProgressBar(frac)
html = html + '<br>'+ProgressBar(frac)
author = article.get("author", "")
if author:
@ -1751,6 +1752,9 @@ def Graph(server, url):
with open(Set.Folder()+"/tabs"+url+"/metadata.json", "w") as save:
json.dump(article, save, indent=4)
# If the cookie got all the way here, it is probably loaded by a person
ProbablyHumanCookies.append(server.cookie)
send(server, html, 200)
@ -2036,6 +2040,8 @@ def Login(server):
# Succesfull authentication
else:
ProbablyHumanCookies.append(server.cookie)
account = Accounts[username]
if "sessions" not in account:
@ -2336,7 +2342,7 @@ def DoComment(server):
# Limiting bots from commenting
if not server.cookie:
AccessDenied()
AccessDenied(server)
return
user = validate(server.cookie)