Skip to content

Conversation

@gryphon2411
Copy link

@gryphon2411 gryphon2411 commented Dec 6, 2025

Implements support for autofilling custom fields defined in vault items.

  • Updates parsing logic to identify generic inputs as 'Custom' candidates.
  • Updates filling logic to match custom fields by name/label against view hints/IDs.
  • Enforces strict URI matching for custom fields as a security mitigation.
  • Fixes regression where generic inputs were ignored for username autofill.

Verification

I have verified this functionality using the Android Emulator (API 35) and the standardDebug build.

Test Case: Timewatch.co.il

  1. URL: https://c.timewatch.co.il/punch/punch.php
  2. Vault Item:
    • URI: https://c.timewatch.co.il (Strict match)
    • Username: 12345 (Employee Number)
    • Password: ******
    • Custom Field: Name: company, Value: comp123
  3. Result:
    • Tapping "Company Number" autofills comp123.
    • Tapping "Employee Number" autofills 12345.
    • Tapping "Password" autofills ******.

Automated Tests:

  • Added FilledDataBuilderCustomFieldTest: Verifies strict matching and field mapping.
  • Added AutofillParserRegressionTests: Verifies generic input promotion to Username.

Context

Ref: PM-29304 (Internal Ticket)

Addresses community feature requests for Android Custom Field Autofill:

Implements support for autofilling custom fields defined in vault items. Includes strict URI matching for security and regression fix for generic inputs.
@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-29304
Link: https://bitwarden.atlassian.net/browse/PM-29304

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title feat: Add custom field autofill support with strict URI matching [PM-29304] feat: Add custom field autofill support with strict URI matching Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants