Commit Graph

5 Commits

Author SHA1 Message Date
Byron.wang 1c9e28bc75 Feat: Replace the internal/oss module with dify-cloud-kit (#317)
* replace internal oss with dify-cloud-kit

* remove validate

* fix tests

* fix tests
2025-05-30 16:44:59 +08:00
Yeuoly 3ab625d8d3 fix(persistence): correct path traversal checks in tests and implementation (#205)
* fix(persistence): implement path traversal checks

- Updated test cases to expect no errors for valid paths with double slashes and mixed traversal.
- Enhanced the `checkPathTraversal` method to clean the key using `path.Clean` to prevent path traversal vulnerabilities.
- Removed redundant checks in the `getFilePath`, `Save`, `Load`, and `Delete` methods, simplifying the code while maintaining security.

* refactor(tests): simplify persistence tests using testify assertions

- Replaced manual error handling with testify's assert functions for cleaner test code.
- Improved readability and maintainability of test cases by using assertions for error checks and value comparisons.
- Ensured that all tests continue to validate the expected behavior of the persistence layer.
2025-04-15 14:27:14 +08:00
非法操作 e9cd678fad add exist for self.session.storage (#195) 2025-04-11 17:49:30 +08:00
Yeuoly 26fd94ebcd refactor: convert snakecase to camelcase 2024-11-12 21:24:41 +08:00
Yeuoly aec7ef024a fix: incorrect persistence storage path 2024-11-08 19:31:32 +08:00