Commit Graph

4 Commits

Author SHA1 Message Date
WH-2099
2c6dc82ab7 fix: canonicalize persisted file references 2026-03-21 14:40:49 +08:00
-LAN-
98815b55d0 feat: add file access controller
Signed-off-by: -LAN- <laipz8200@outlook.com>
2026-03-20 23:19:51 +08:00
-LAN-
fa55accb25 fix: resolve tenant_id in message.inputs
Signed-off-by: -LAN- <laipz8200@outlook.com>
2026-03-20 23:18:40 +08:00
Yongtao Huang
5bc6e8a433 Fix: correct regex for file-preview URL re-signing (#25620)
Fixes #25619

The regex patterns for file-preview and image-preview contained an unescaped `?`, 
which caused incorrect matches such as `file-previe` or `image-previw`. 
This led to malformed URLs being incorrectly re-signed.

Changes:
- Escape `?` in both file-preview and image-preview regex patterns.
- Ensure only valid URLs are re-signed.

Added unit tests to cover:
- Valid file-preview and image-preview URLs (correctly re-signed).
- Misspelled file/image preview URLs (no longer incorrectly matched).

Other:
- Fix a deprecated function `datetime.utcnow()`

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
2025-09-22 10:58:29 +08:00