check for cookie anamolies in rdrama

master
Aevann 2023-06-08 00:22:53 +03:00
parent 3a3615d292
commit d353f57f21
1 changed files with 11 additions and 0 deletions

View File

@ -68,6 +68,17 @@ def after_request(response:Response):
if user_id: if user_id:
r.delete(f'LIMITER/{SITE}-{user_id}/{request.endpoint}:{request.path}/1/1/second') r.delete(f'LIMITER/{SITE}-{user_id}/{request.endpoint}:{request.path}/1/1/second')
if SITE == 'rdrama.net':
counter = 0
for key in request.cookies.keys():
if key == app.config["SESSION_COOKIE_NAME"]:
counter += 1
else:
response.delete_cookie(key)
if counter > 1:
print(request.cookies.keys(), flush=True)
return response return response