Compare commits

...

2 Commits

Author SHA1 Message Date
Mahan Noorbahr
9cb92b3ff2
Merge 8717b26698 into 3fe9f5fecb 2026-07-04 14:10:54 +08:00
Mahan Noorbahr
8717b26698
Change temporary file permissions to 666
Set permissions of the temporary file to 666 before replacing.
ComfyUI could be used in a shared environment and the restricted permissions introduced by this temporary file creation makes it so that workflows and other files saved through this endpoint are inaccessible by others.
2026-04-16 16:26:27 +09:30

View File

@ -396,6 +396,7 @@ class UserManager():
try:
with os.fdopen(fd, "wb") as f:
f.write(body)
os.chmod(tmp_path, 0o666)
os.replace(tmp_path, path)
except:
os.unlink(tmp_path)