Skip to content

fix(lock): do not spend a PAM attempt on an empty password submit - #3247

Open
fromelicks wants to merge 1 commit into
AvengeMedia:masterfrom
fromelicks:fix/lock-empty-password-submit
Open

fix(lock): do not spend a PAM attempt on an empty password submit#3247
fromelicks wants to merge 1 commit into
AvengeMedia:masterfrom
fromelicks:fix/lock-empty-password-submit

Conversation

@fromelicks

@fromelicks fromelicks commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

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 #2982 was resolved with a dedicated lockScreenSecurityKeyShortcut rather than bare Enter.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

I'm not sure yet, whether this is a breaking change or not.

Related issues

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally (I've made them and use them for myself)
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document any new behaviors: https://github.com/AvengeMedia/DankLinux-Docs

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
fromelicks force-pushed the fix/lock-empty-password-submit branch from 8deb924 to 6161966 Compare September 6, 2026 16:06
@fromelicks
fromelicks marked this pull request as ready for review September 6, 2026 16:08
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.

1 participant