test: add comprehensive unit tests for encrypter module#22102
Merged
crazywoola merged 1 commit intoJul 10, 2025
Conversation
- Add tests for token obfuscation with various lengths and special characters - Add encryption/decryption tests with proper mocking - Add batch decryption optimization tests - Add security-focused tests including cross-tenant isolation and tampered ciphertext detection - Add edge case tests for empty tokens, special characters, and RSA size limits - Achieve high test coverage for all public functions in encrypter module
crazywoola
approved these changes
Jul 10, 2025
Scorpion1221
added a commit
to yybht155/dify
that referenced
this pull request
Jul 16, 2025
* commit '390e4cc0bf203a979e13694ed99ec9fda6b42cc8': (143 commits) chore(version): bump to 1.6.0 (langgenius#22136) chore: fix schema editor can not hover item (langgenius#22155) fix: add the default value to the dark icon (langgenius#22149) feat: support ping method for MCP server (langgenius#22144) fix: mcp server card button display (langgenius#22141) feat: add support for dark icons in provider and tool entities (langgenius#22081) update worklow events logs. (langgenius#19871) chore: translate i18n files (langgenius#22132) feat: the frontend part of mcp (langgenius#22131) feat: add MCP support (langgenius#20716) Fix: Resolve issue with json_output (langgenius#22053) Chore: rm useless import and vars (langgenius#22108) feat: add redis fallback mechanism langgenius#21043 (langgenius#21044) optimize: batch embedding and qdrant write_consistency_factor parameter (langgenius#21776) chore: Update theme vars (langgenius#22113) feat(question-classifier): add drag-and-drop sorting for topics list (langgenius#22066) test: add comprehensive unit tests for encrypter module (langgenius#22102) fix: allow update plugin install settings (langgenius#22111) fix(Drawer): add overflow hidden to ensure copy button is always clickable (langgenius#21992) (langgenius#22103) Update clean_document_task.py (langgenius#22090) ... # Conflicts: # api/core/helper/code_executor/template_transformer.py # api/pyproject.toml # api/uv.lock
tutkun
pushed a commit
to tutkun/dify
that referenced
this pull request
Aug 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add comprehensive unit tests for
core.helper.encryptermodule.Core Functionality Tests
Security-Focused Tests
Edge Cases
The extensive test coverage is intentional given the critical nature of encryption functionality in the system.
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods