HLE/xgameui: a password text entry hides what is typed #836
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!836
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-836"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@CwWwWwW on GitHub · 2026-11-28 07:34 UTC · original
CwWwWwW:fix/gameui-password-scope→main· +84 −11 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCPorted to trustno1-coder/VIctory-NVIDIA from the same change submitted to fxceless/victory-fork as PR #1467 (head
f75c359a24, author CwWwWwW). The fork's own line was dropped when it rebased onto959dcaf(5dbf5ce), so this is submitted here directly. The description below is the original one; its 'Verification' numbers refer to the fork tree. Rebased onto main63b902f.The problem
The text-entry call ignored its input scope (
_scope,crates/victory-hle/src/modules/xgameui.rs:60). The GDK'sXGameUiTextEntryInputScope::Passwordis 31, and its documented behaviour is that the text box hides what the user types. The HLE opened an ordinaryES_AUTOHSCROLLedit box, so an in-game password prompt echoed the password in clear. The title still received the typed text, so the result path is unchanged.The current title does not call text entry; this is a latent privacy/compatibility defect for any title that asks for a password through this API.
Contract evidence (read-only research, no code taken)
XGameUiTextEntryInputScope:Password = 31; "A password, including alphanumeric characters and other symbols... This will be a fully localized keyboard where the textbox hides characters as the user types."XGameUiShowTextEntryAsync: with the Password scope the maximum length is always 1024 andmaxTextLengthis ignored. That limit rule is separate and already covered by open #653/#331/#295, so this PR does not touch limits.max_length_for()(value only; no code is taken from it).The change
text_entry_asyncnow readsscope, computespassword = scope == 31, and threads the flag throughask/dialog::ask; the dialog's edit box addsES_PASSWORDwhen the entry is a password. Every other scope is unchanged and produces exactly the previous dialog and result.Evidence
New test
gameui::tests::a_password_entry_asks_for_a_text_box_that_hides_what_is_typed: the module's test dialog marks a dialog that was asked to hide its text with a trailing*.abctypedinstead of 10 bytes /abctyped*;abctyped.Verification on this branch (base
9a9091d):cargo test -p victory-hle --lib --locked -- --test-threads=1鈥?104 passed, 0 failedcargo clippy -p victory-hle --all-targets --locked -- -D warnings鈥?cleancargo clippy -p victory-hle --all-targets --locked --all-features -- -D warnings鈥?cleangit diff --checkclean; the change adds no new fmt diff (the crate already has pre-existing fmt diffs on this toolchain).The masked rendering itself is a host dialog style and is not exercised by unit tests (this module's tests mock the dialog, as before); the scope-to-mask wiring is pinned by the test and the style addition is a two-line, review-visible change.
Scope and overlap
One file,
crates/victory-hle/src/modules/xgameui.rs(+87/-11). The Password 1024-character cap is covered by open #653/#331/#295 and is not duplicated; #653 does not implement hiding the text (its xgameui.rs has noES_PASSWORD). This change touches thetext_entry_async/asklines that #653 rewrites, so a rebase may be needed when either lands. CI'scheckmay be red from main's own clippy and asset-policy failures (#1440/#1322), which this diff does not touch.Verification on this tree (base
63b902f, 2026-11-27)63b902ffailed on those before this change.@Dukestar69 on GitHub · 2026-11-28 07:48 UTC · original · approved these changes
Tested locally merged onto
main(63b902f).cargo xtask policypassed (294 files ok).cargo test -p victory-hle --lib xgameuipassed (4 passed; 0 failed, including the newa_password_entry_asks_for_a_text_box_that_hides_what_is_typedtest) with 0 compiler warnings.Clean UI password-masking handling in
xgameui. LGTM.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).