Refactor AnonConnectionWizard for thread stability, secure file handling and UI privacy#4
Open
sans1924-prog wants to merge 1 commit into
Open
Refactor AnonConnectionWizard for thread stability, secure file handling and UI privacy#4sans1924-prog wants to merge 1 commit into
sans1924-prog wants to merge 1 commit into
Conversation
…ing, and UI privacy This pull request introduces targeted stability, security, and privacy improvements specifically to the `anon_connection_wizard.py` module. ### Key Changes: * **Graceful Thread Termination:** Introduced a custom `_cleanup_bootstrap_thread()` method to prevent UI deadlocks[cite: 1]. This waits up to 2 seconds for a graceful exit before forcing termination, and is now properly called when the wizard is cancelled, fails to authenticate, or encounters a missing controller[cite: 1]. * **Secure File Contexts:** Replaced standard `open().read()` calls with secure `with open(...) as f:` context managers when reading the `torrc_file_path`[cite: 1]. This ensures file descriptors are reliably closed. * **Credential Masking:** Enhanced UI privacy by applying `setEchoMode(QLineEdit.Password)` to the proxy password input field (`password_edit`)[cite: 1]. This securely masks user credentials while configuring optional proxy settings[cite: 1].
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.
This pull request introduces targeted stability, security, and privacy improvements specifically to the
anon_connection_wizard.pymodule.Key Changes:
_cleanup_bootstrap_thread()method to prevent UI deadlocks[cite: 1]. This waits up to 2 seconds for a graceful exit before forcing termination, and is now properly called when the wizard is cancelled, fails to authenticate, or encounters a missing controller.open().read()calls with securewith open(...) as f:context managers when reading thetorrc_file_path[cite: 1]. This ensures file descriptors are reliably closed.setEchoMode(QLineEdit.Password)to the proxy password input field (password_edit). This securely masks user credentials while configuring optional proxy settings.This pull request changes...
Changes
Mandatory Checklist
Terms of Service, Privacy Policy, Cookie Policy, E-Sign Consent, DMCA, Imprint
Optional Checklist
The following items are optional but might be requested in certain cases.
Fixes #