mirror of https://github.com/langgenius/dify.git
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> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_add_document_to_index_task.py | ||
| test_batch_clean_document_task.py | ||
| test_batch_create_segment_to_index_task.py | ||
| test_clean_dataset_task.py | ||
| test_clean_notion_document_task.py | ||
| test_create_segment_to_index_task.py | ||
| test_deal_dataset_vector_index_task.py | ||
| test_delete_segment_from_index_task.py | ||
| test_disable_segment_from_index_task.py | ||
| test_disable_segments_from_index_task.py | ||
| test_document_indexing_task.py | ||