WeKnora/internal/utils
wizardchen bb202a203a feat: implement tenant validation for file access and enhance related tests
This commit introduces a new validation mechanism to ensure that file access paths include the correct tenant segment, preventing cross-tenant access. The `ValidateStoragePathTenant` function has been added to enforce this rule, and the `serveFiles` function has been updated to return a forbidden status for invalid paths. Additionally, new tests have been added to verify the behavior of the file service under various tenant scenarios, ensuring robust handling of file access permissions.
2026-05-29 13:47:32 +08:00
..
crypto.go feat(crypto): AES-GCM at-rest for MCP and DataSource credentials with graceful key-rotation handling 2026-05-17 15:27:52 +08:00
crypto_test.go fix(crypto): fail loudly when encrypted DB fields cannot be decrypted 2026-04-30 15:17:56 +08:00
debug.go feat: 使用增强的任务ID生成器替换UUID 2026-01-14 17:09:19 +08:00
extraheaders.go feat(models): support custom HTTP headers across all remote model calls 2026-04-23 23:36:40 +08:00
extraheaders_test.go feat(models): support custom HTTP headers across all remote model calls 2026-04-23 23:36:40 +08:00
filesize.go feat(system): consolidate system admin and settings into one Settings panel 2026-05-26 21:13:56 +08:00
fileutil.go fix(storage): auto-detect content-type to resolve image rendering issues 2026-04-20 21:59:54 +08:00
httputil.go feat: enhance document loading and state management in doc-content component 2026-03-02 21:21:49 +08:00
inject.go fix: improve tenant access token logging and update test cases 2026-04-22 21:17:30 +08:00
inject_test.go fix: improve tenant access token logging and update test cases 2026-04-22 21:17:30 +08:00
json.go feat: Add DataSchema tool for retrieving schema information from CSV and Excel files 2025-12-29 20:03:51 +08:00
log_sanitize.go feat: implement image upload and multimodal support 2026-03-12 10:32:26 +08:00
presign.go feat: implement tenant validation for file access and enhance related tests 2026-05-29 13:47:32 +08:00
presign_test.go feat: implement tenant validation for file access and enhance related tests 2026-05-29 13:47:32 +08:00
security.go feat(system): consolidate system admin and settings into one Settings panel 2026-05-26 21:13:56 +08:00
security_test.go feat(retriever): add OpenSearch driver skeleton + interface stubs (PR 2a of 3) 2026-05-26 20:54:58 +08:00
taskid.go feat: 使用增强的任务ID生成器替换UUID 2026-01-14 17:09:19 +08:00