ComfyUI/tests-unit/folder_paths_test
Dr.Lt.Data af96d9812d
feat(security): add System User protection with __ prefix (#10966)
* feat(security): add System User protection with `__` prefix

Add protected namespace for custom nodes to store sensitive data
(API keys, licenses) that cannot be accessed via HTTP endpoints.

Key changes:
- New API: get_system_user_directory() for internal access
- New API: get_public_user_directory() with structural blocking
- 3-layer defense: header validation, path blocking, creation prevention
- 54 tests covering security, edge cases, and backward compatibility

System Users use `__` prefix (e.g., __system, __cache) following
Python's private member convention. They exist in user_directory/
but are completely blocked from /userdata HTTP endpoints.

* style: remove unused imports
2025-11-28 21:28:42 -05:00
..
__init__.py Add content-type filter method to folder_paths (#4054) 2024-09-11 02:00:07 -04:00
filter_by_content_types_test.py Update filter_files_content_types to support filtering 3d models (#7572) 2025-04-12 18:30:39 -04:00
misc_test.py LoRA Trainer: LoRA training node in weight adapter scheme (#8446) 2025-06-13 19:25:59 -04:00
system_user_test.py feat(security): add System User protection with __ prefix (#10966) 2025-11-28 21:28:42 -05:00