mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2025-10-23 15:11:08 +00:00
fix(cdm): Clean up session data when retrieving cached keys
Remove decrypt_labs_session_id and challenge from session when cached keys exist but there are missing kids, ensuring clean state for subsequent requests.
This commit is contained in:
@@ -435,6 +435,12 @@ class DecryptLabsRemoteCDM:
|
||||
if missing_kids:
|
||||
session["cached_keys"] = parsed_keys
|
||||
request_data["get_cached_keys_if_exists"] = False
|
||||
|
||||
if "decrypt_labs_session_id" in session:
|
||||
del session["decrypt_labs_session_id"]
|
||||
if "challenge" in session:
|
||||
del session["challenge"]
|
||||
|
||||
response = self._http_session.post(f"{self.host}/get-request", json=request_data, timeout=30)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
|
||||
Reference in New Issue
Block a user