Repository navigation
a password is typed only into a password box, and nothing is submitted when one would land elsewhere - #382
Merged
Conversation
…d when one would land elsewhere
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.
The bug
On 10 Oct 2026 a saved-login fill on Facebook typed the password into the email box, where it showed in plain text, and pressed Log in, sending it as the username.
fill_into_focusreaches each field by clicking where the model said it is, or by Tab, and then types without checking where focus actually landed.The fix
Needs hexuria/box#38. The box now says what kind of box has focus (
focusandseqinGET /v1/chrome/active-tab).opengrok-box: newComputer::focused_fieldreturning aFocus {kind, seq}. By default it errors, meaning the computer can't say. The docker box reads it from the active-tab report (focus_in); an image from before the report has noseq, so it can't say.opengrok-formsfill_into_focus: before typing a password (typepassword, or marked secret, but not anotpcode), it reads the report from before reaching the field. After the click or Tab, it waits up to 1.5 s for a fresh report, then types only if the focused box is apasswordbox.fill_failed, and so Return is never pressed.Deploy note: a server with this change and a box image from before #38 refuses every password fill, failing closed, until the image is rebuilt.
Tests
a_password_whose_click_lands_on_the_email_box_is_not_typed. The 10 Oct case: the password's position lands on the email box. The email is typed, the password never is, and nothing is submitted.a_computer_that_cannot_say_which_box_has_focus_types_no_password.fill_into_focus, 2 tests fail. With the fix, all 27 fill tests pass.FillSpynow models a page: a click or Tab moves focus, and it reports the focused box's kind. The existing password tests got pages that match their forms.against_user_form's stub reports a password box after every action. Those tests cover who may fill and where; the focus rule is the unit tests' to prove.the_focused_box_is_read_from_the_active_tab_report, against the exact JSON the new box image answered live.-D warnings, fmt and the crate-size check are clean.Live check
The box half was checked live in a container built from hexuria/box#38 (see that PR):
text→password→none→passwordas focus moved. A full fill on a Bot's computer needs that image on the Bot's computer; to do after #38 merges.