1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Remove auth tokens from history storage (#8889)

Remove auth_token_comfy_org and api_key_comfy_org from extra_data before
storing prompt history to prevent sensitive authentication tokens from
being persisted in the history endpoint response.
This commit is contained in:
Christian Byrne
2025-07-13 01:46:27 -07:00
committed by GitHub
parent b40143984c
commit 480375f349

View File

@@ -1045,6 +1045,12 @@ class PromptQueue:
if status is not None:
status_dict = copy.deepcopy(status._asdict())
# Remove auth tokens from extra_data before storing in history
if "auth_token_comfy_org" in prompt[3]:
del prompt[3]["auth_token_comfy_org"]
if "api_key_comfy_org" in prompt[3]:
del prompt[3]["api_key_comfy_org"]
self.history[prompt[1]] = {
"prompt": prompt,
"outputs": {},