Skip to content

Suppress IME preedit reveal on password fields - #13001

Open
Rhytam23 wants to merge 1 commit into
omacom:quattrofrom
Rhytam23:fix/lock-password-ime-leak
Open

Rhytam23 wants to merge 1 commit into
omacom:quattrofrom
Rhytam23:fix/lock-password-ime-leak

Conversation

@Rhytam23

@Rhytam23 Rhytam23 commented Sep 23, 2026

Copy link
Copy Markdown

Summary

  • TextInput.Password / Ui/TextField's password mode only mask committed text. An active input method (fcitx5, ibus, ...) still renders its own preedit/candidate popup with the literal characters being composed, independent of echoMode, until Qt.ImhSensitiveData | Qt.ImhHiddenText | Qt.ImhNoPredictiveText hints tell it not to.
  • Adds inputMethodHints to the lock screen password field (shell/plugins/lock/LockView.qml), the shared password mode of shell/Ui/TextField.qml, and the masked state of the Polkit auth prompt (shell/plugins/polkit/PolkitAgent.qml), so a password typed while composing with an IME isn't shown in plaintext on the unlock screen or privilege-escalation dialogs.
  • This lines up with the vague repro in password becomes visible when unlocking #12727 ("focus/unfocused unlock perhaps") — preedit only appears during active IME composition, which is tied to focus — and is more likely to be hit now that fcitx5 is seeded as the default IM.

Fixes #12727

Test plan

  • Enable fcitx5/ibus, focus the lock screen password field, and confirm no preedit/candidate popup shows literal characters while typing
  • Confirm the Wi-Fi passphrase field (Ui/TextField in password mode) behaves the same way
  • Confirm the Polkit auth prompt masks IME preedit when not in "show password" mode
  • ./test/shell (ran in a non-Linux dev environment here, so it could not fully execute — please re-run in CI)

echoMode: TextInput.Password only masks committed text. An active input
method (fcitx5, ibus, ...) still draws its own preedit/candidate popup
with the literal characters being typed, independent of the field's echo
mode, until Qt.ImhSensitiveData/ImhHiddenText/ImhNoPredictiveText hints
tell it not to.

Sets inputMethodHints on the lock screen password field, the shared
Ui/TextField password mode, and the Polkit auth prompt's masked state,
so a password typed while composing with an IME isn't shown in plaintext
on unlock or privilege-escalation dialogs.

Fixes omacom#12727
@llstrk

llstrk commented Sep 23, 2026

Copy link
Copy Markdown

The added hints do not change the effective input-method flags in the inspected Qt versions, so they do not establish the proposed fix for #12727.

Password mode overrides the explicit hints

This affects all three additions: LockView.qml, the shared password TextField, and the masked Polkit response. Qt returns effectiveInputMethodHints() to the input method, rather than the raw QML property:

Qt implementation Existing TextInput.Password With this PR
6.10.2 Automatically adds HiddenText, SensitiveData and NoPredictiveText Same effective flags
6.11.2 Removes HiddenText, even when explicitly requested; adds SensitiveData and NoPredictiveText Same effective flags, still without HiddenText

Both versions also add NoAutoUppercase. See the effective-hints implementation in Qt 6.10.2 and Qt 6.11.2, and the latter's input-method query. Synthetic Qt 6.11.2 password inputs also returned 0x46 on both sides despite the explicit property changing from 0 to 0x43.

Impact: The input method receives no new password-protection flags. In particular, explicitly adding HiddenText cannot restore it on Qt 6.11.2. The comments saying these declarations suppress preedit, and the claim that this fixes #12727, are not supported by this change. The reported exposure itself was not reproduced, and its root cause remains unconfirmed.

Suggested change: Identify the actual exposed-text path with a baseline/head IME reproduction on the affected Qt version, then change that path rather than redeclaring flags Qt already adds or removes. Until that difference is demonstrated, avoid presenting these declarations as the fix.


Review information

Test scope: Pinned head 08b5521; project and Qt source inspection, plus recorded synthetic offscreen QML input-method queries on Qt 6.11.2. No live fcitx5/ibus composition, candidate-popup, lock-screen or authentication test; no verified end-to-end suppression claim.

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Automated AI review: Astra Medium initial inspection, independent Opus 5.5 High and GPT 6 Sol Xhigh technical reviews, followed by coordinator verification of the cited source and recorded query values. A fresh Astra Medium check assessed presentation and disclosures only.

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.

password becomes visible when unlocking

2 participants