Skip to content

Commit 480375f

Browse files
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.
1 parent b401439 commit 480375f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

execution.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,12 @@ def task_done(self, item_id, history_result,
10451045
if status is not None:
10461046
status_dict = copy.deepcopy(status._asdict())
10471047

1048+
# Remove auth tokens from extra_data before storing in history
1049+
if "auth_token_comfy_org" in prompt[3]:
1050+
del prompt[3]["auth_token_comfy_org"]
1051+
if "api_key_comfy_org" in prompt[3]:
1052+
del prompt[3]["api_key_comfy_org"]
1053+
10481054
self.history[prompt[1]] = {
10491055
"prompt": prompt,
10501056
"outputs": {},

0 commit comments

Comments
 (0)