From 847764e4402d54f78ab18f34ff9ec00516596b7e Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 2 Feb 2025 15:50:08 +0700 Subject: [PATCH] strip nullbyte from cookie --- backend/download/src/yt_dlp_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/download/src/yt_dlp_base.py b/backend/download/src/yt_dlp_base.py index b3ce3e16..ca7ce938 100644 --- a/backend/download/src/yt_dlp_base.py +++ b/backend/download/src/yt_dlp_base.py @@ -132,7 +132,8 @@ class CookieHandler: def set_cookie(self, cookie): """set cookie str and activate in config""" - RedisArchivist().set_message("cookie", cookie, save=True) + cookie_clean = cookie.strip("\x00") + RedisArchivist().set_message("cookie", cookie_clean, save=True) AppConfig().update_config({"downloads.cookie_import": True}) self.config["downloads"]["cookie_import"] = True print("[cookie]: activated and stored in Redis")