fix(lock): do not spend a PAM attempt on an empty password submit - #3247
Open
fromelicks wants to merge 1 commit into
Open
fix(lock): do not spend a PAM attempt on an empty password submit#3247fromelicks wants to merge 1 commit into
fromelicks wants to merge 1 commit into
Conversation
Enter, or the enter button, on an empty password field calls `pam.passwd.start()`. The attempt cannot succeed, but it still consumes a `pam_faillock` attempt, so a stray `Enter` on the lock screen moves the session towards a real lockout for nothing. Guard both submit paths with `canSubmitPassword()`. The guard is not unconditional: an empty submit is still allowed when the PAM stack is not DMS's own (`lockPamExternallyManaged`, or a custom `lockPamPath`), because there the conversation itself may prompt for an inline u2f or fingerprint touch and Enter is how the user starts it. The DMS-managed u2f path is unaffected, since AvengeMedia#2982 was resolved with a dedicated `lockScreenSecurityKeyShortcut` rather than bare `Enter`.
fromelicks
force-pushed
the
fix/lock-empty-password-submit
branch
from
September 6, 2026 16:06
8deb924 to
6161966
Compare
fromelicks
marked this pull request as ready for review
September 6, 2026 16:08
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
Enterbutton, on an empty password field callspam.passwd.start(). The attempt cannot succeed, but it still consumes apam_faillockattempt, so a strayEnteron the lock screen moves the session towards a real lockout for nothing.Guard both submit paths with
canSubmitPassword(). The guard is not unconditional: an empty submit is still allowed when the PAM stack is not DMS's own (lockPamExternallyManaged, or a customlockPamPath), because there the conversation itself may prompt for an inline u2f or fingerprint touch and Enter is how the user starts it. The DMS-managed u2f path is unaffected, since #2982 was resolved with a dedicatedlockScreenSecurityKeyShortcutrather than bareEnter.Type of change
I'm not sure yet, whether this is a breaking change or not.
Related issues
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings