Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Scanner] Don't stop scanner fully on max forms #617

Merged
merged 5 commits into from
Jul 26, 2024

Conversation

dbajpeyi
Copy link
Collaborator

@dbajpeyi dbajpeyi commented Jul 24, 2024

Reviewer: @shakyShane @GioSensation
Asana: https://app.asana.com/0/0/1207840563867787/f

Description

Originally, #574 fixed an issue that destructed forms if it didn't have enough eligible inputs that could be filled out. This way such forms won't take up the form pool (of max 30 forms), and avoid getting into a situation where an actually useful form won't get into the pool. However, the PR also introduced a problem that if there were many lonely inputs (e.g in ~60 this test form), the scanner created forms that self destructed over and over again.

This PR tries a different approach:

  1. Reverts the original PR mentioned above (except few aesthetic changes),
  2. Renames scanShadow -> scanOnClick and extends it to not only work for elements within shadow trees, but also general inputs that might need to be scanned again.
  3. Modifies the stopScanner so that it can take an additional param that allows keeping form listeners,
  4. Performance tests seems to not show any regression.

Steps to test

Originally reported sites: https://scanmalta.com/shop

  1. Build the browser locally with autofill, go to https://scanmalta.com/shop,
  2. click on the login button and if you have credentials saved you will see that autofill is prompted.
  3. Submit button statistics are back to how it was before scanner: discard Form instances with no classified inputs #574. This is unfortunate, but makes sense because this solution is less general.
   Submit button statistics:
       638 detected (47% false positive)
       389 manually identified (14% false negative)

@dbajpeyi dbajpeyi force-pushed the dbajpeyi/scan-sites-on-click branch 4 times, most recently from 0f632bf to 94dada9 Compare July 24, 2024 03:41
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/scan-sites-on-click branch from 94dada9 to ee21936 Compare July 24, 2024 03:46
@dbajpeyi dbajpeyi marked this pull request as ready for review July 24, 2024 04:04
@dbajpeyi dbajpeyi changed the title feat: don't stop scanner fully on max forms [Scanner] Don't stop scanner fully on max forms Jul 24, 2024
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/scan-sites-on-click branch from 76b59a1 to 923bf77 Compare July 24, 2024 04:15
src/Scanner.js Outdated Show resolved Hide resolved
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/scan-sites-on-click branch from 1362c8a to 43eedad Compare July 24, 2024 05:24
@dbajpeyi dbajpeyi merged commit 04d1e1d into main Jul 26, 2024
1 check passed
@dbajpeyi dbajpeyi deleted the dbajpeyi/scan-sites-on-click branch July 26, 2024 08:47
CDRussell pushed a commit to duckduckgo/Android that referenced this pull request Aug 2, 2024
Task/Issue URL:
https://app.asana.com/0/1207920271697429/1207920271697429
Autofill Release:
https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/12.1.0


## Description
Updates Autofill to version
[12.1.0](https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/12.1.0).

### Autofill 12.1.0 release notes
## What's Changed
* [Form] Skip autofilling select input if it was changed already by
@dbajpeyi in duckduckgo/duckduckgo-autofill#580
* scanner: discard Form instances with no classified inputs by @sjbarag
in duckduckgo/duckduckgo-autofill#574
* [Credentials] Autofill when elements are in shadow by @dbajpeyi in
duckduckgo/duckduckgo-autofill#592
* Update password-related json files (2024-07-19) by @daxmobile in
duckduckgo/duckduckgo-autofill#607
* [Scanner] Don't stop scanner fully on max forms by @dbajpeyi in
duckduckgo/duckduckgo-autofill#617
* tests: remove spurious logging from unit tests by @sjbarag in
duckduckgo/duckduckgo-autofill#575
* Add credit card test form failure by @GioSensation in
duckduckgo/duckduckgo-autofill#588

## New Contributors
* @dbajpeyi made their first contribution in
duckduckgo/duckduckgo-autofill#580

**Full Changelog**:
duckduckgo/duckduckgo-autofill@12.0.1...12.1.0

## Steps to test
This release has been tested during autofill development. For smoke test
steps see [this
task](https://app.asana.com/0/1198964220583541/1200583647142330/f).

Co-authored-by: GioSensation <1828326+GioSensation@users.noreply.github.com>
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.

3 participants