Skip to content

Fix critical bugs and expand test coverage - #84

Open
thejedi433 wants to merge 1 commit into
gabfl:mainfrom
thejedi433:main
Open

Fix critical bugs and expand test coverage#84
thejedi433 wants to merge 1 commit into
gabfl:mainfrom
thejedi433:main

Conversation

@thejedi433

@thejedi433 thejedi433 commented Aug 15, 2026

Copy link
Copy Markdown

This PR fixes 3 critical bugs and expands the test suite with 29 new unit tests.

Bug Fixes

  1. Config instance isolation - Fixed shared mutable state in Config class where multiple instances would share the same config dictionary
  2. Enable change_key feature - The rekey functionality was marked as not implemented but the code exists and works. Enabled it with proper user confirmation flow
  3. Enhanced padding validation - Improved padding validation in Encryption.decrypt() to handle edge cases with empty or invalid PKCS7 padding

Test Coverage

Added 29 new tests:

  • 7 new tests for Config instance isolation
  • 11 new tests for Encryption padding validation
  • 11 new tests for change_key functionality

All 287 tests pass on Python 3.11.

@thejedi433 thejedi433 changed the title Fix 4 critical bugs, add tests and Docker support Fix 3 critical bugs: config isolation, rekey implementation, encryption validation Aug 15, 2026
@gabfl

gabfl commented Aug 17, 2026

Copy link
Copy Markdown
Owner

@ thejedi433 I will review the changes but can you please remove the AI-generated markdown files that were added?

thejedi433 pushed a commit to thejedi433/vault that referenced this pull request Aug 17, 2026
Per maintainer request in PR gabfl#84 feedback.
@thejedi433

thejedi433 commented Aug 17, 2026

Copy link
Copy Markdown
Author

Thanks for the feedback! I've cleaned up the PR and removed the unnecessary files. The changes now focus only on the bug fixes and test improvements. Let me know if you need any other changes!

@thejedi433
thejedi433 force-pushed the main branch 2 times, most recently from ab6825b to ea9ccdb Compare August 18, 2026 12:54
@thejedi433 thejedi433 changed the title Fix 3 critical bugs: config isolation, rekey implementation, encryption validation Fix critical bugs and expand test coverage Aug 18, 2026
Bug fixes:
- Fix Config instance isolation (prevent shared state between instances)
- Enable change_key feature (was marked as not implemented)
- Enhance padding validation in Encryption.decrypt()

Test improvements:
- Add 29 new unit tests
- Update test_initialize_3 to mock change_key.rekey()
- All 287 tests passing

Verified on Python 3.11 with uv virtual environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants