sanitize validate cookie str

This commit is contained in:
Simon 2025-02-02 16:41:57 +07:00
parent 3aa41232db
commit 8f22d0d9e2
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -163,9 +163,10 @@ class CookieHandler:
self.store_validation(response)
# update in redis to avoid expiring
modified = validator.obs["cookiefile"].getvalue()
modified = validator.obs["cookiefile"].getvalue().strip("\x00")
if modified:
RedisArchivist().set_message("cookie", modified)
cookie_clean = modified.strip("\x00")
RedisArchivist().set_message("cookie", cookie_clean)
if not response:
mess_dict = {