Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add safeguards to secure input on macOS #11928

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

droidmonkey
Copy link
Member

Testing strategy

Replicated issue on macOS and cannot replicate it after these changes.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@droidmonkey droidmonkey added this to the v2.7.11 milestone Mar 21, 2025
@droidmonkey droidmonkey requested a review from phoerious March 21, 2025 11:31
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.90%. Comparing base (37ddbb3) to head (2a18b84).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #11928      +/-   ##
===========================================
- Coverage    63.92%   63.90%   -0.03%     
===========================================
  Files          369      369              
  Lines        38920    38920              
===========================================
- Hits         24878    24868      -10     
- Misses       14042    14052      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if (enable) {
// Always keep the internal counter set to 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of arcane. There should be a more thorough explanation in the comment as to what this does and why it's needed.

Copy link
Member Author

@droidmonkey droidmonkey Mar 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The api with macos is so bad. It keeps an internal counter that you have to decrement to zero to disable the feature. There is no way to determine the counter value. There is also no way to determine if your app (specifically) is still blocking.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put that in the comment and we're good. 😉

* Fixes #11906
* Disable secure input when password widget is hidden as well as focused out
* Add safeguard to ensure the internal counter that macOS keeps is always set to 1 preventing the ability to disable secure input by focus/unfocus a password field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keepassxc 2.7.10 on macOS is often stuck in "secure input" mode
2 participants