Closed Bug 1360694 Opened 8 years ago Closed 7 years ago

[Form Autofill] Cap the length of profile fields saved in storage

Categories

(Toolkit :: Form Manager, defect, P5)

53 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- fixed
firefox58 --- fixed

People

(Reporter: MattN, Assigned: lchang)

References

(Blocks 1 open bug)

Details

(Whiteboard: [form autofill:MVP])

Attachments

(2 files)

Similar to bug 488796, we shouldn't save huge fields in autofill storage since we don't ask to save each profile.
Assignee: nobody → ralin
Status: NEW → ASSIGNED
Unassign myself as MattN has a ready-made patch for this :D
Assignee: ralin → nobody
Status: ASSIGNED → NEW
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
Hi Matt, I'd like to take over this bug if you don't mind.
Assignee: MattN+bmo → lchang
Status: ASSIGNED → NEW
Attached patch WIP patchSplinter Review
Matt, Thanks.
Status: NEW → ASSIGNED
Priority: -- → P5
Ray, Would you mind taking a look at this patch (since you once studied it)? Thanks.
Comment on attachment 8919993 [details] Bug 1360694 - [Form Autofill] Cap the length of profile fields saved in storage. https://reviewboard.mozilla.org/r/190942/#review196142 LGTM, thanks. few minor comments, but not big deal. ::: browser/extensions/formautofill/FormAutofillHandler.jsm:691 (Diff revision 1) > log.debug("No address record saving since there are only", > Object.keys(data.address.record).length, > "usable fields"); maybe we can make these lines in the same indent level ::: browser/extensions/formautofill/FormAutofillUtils.jsm:31 (Diff revision 1) > "givenName", "additionalName", "familyName", "organization", "streetAddress", > "state", "province", "city", "country", "zip", "postalCode", "email", "tel", > ]; > const MANAGE_CREDITCARDS_KEYWORDS = ["manageCreditCardsTitle", "addNewCreditCardTitle", "showCreditCardsBtnLabel"]; > const EDIT_CREDITCARD_KEYWORDS = ["cardNumber", "nameOnCard", "cardExpires"]; > +const MAX_FIELD_VALUE_LENGTH = 200; A comment would be a plus to clarify its usage.
Attachment #8919993 - Flags: review?(ralin) → review+
Comment on attachment 8919993 [details] Bug 1360694 - [Form Autofill] Cap the length of profile fields saved in storage. https://reviewboard.mozilla.org/r/190942/#review196142 > A comment would be a plus to clarify its usage. Good point. Thanks.
Pushed by lchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/72cce53ae7fd [Form Autofill] Cap the length of profile fields saved in storage. r=ralin
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Comment on attachment 8919993 [details] Bug 1360694 - [Form Autofill] Cap the length of profile fields saved in storage. Approval Request Comment [Feature/Bug causing the regression]: Feature. [User impact if declined]: A potential risk that users' disks might be filled by malicious data. [Is this code covered by automated tests?]: Yes. [Has the fix been verified in Nightly?]: Verified locally. [Needs manual test from QE? If yes, steps to reproduce]: No. [List of other uplifts needed for the feature/fix]: N/A [Is the change risky?]: No. [Why is the change risky/not risky?]: Just added a check for string length. [String changes made/needed]: N/A
Attachment #8919993 - Flags: approval-mozilla-beta?
Comment on attachment 8919993 [details] Bug 1360694 - [Form Autofill] Cap the length of profile fields saved in storage. Must fix, Beta57+
Attachment #8919993 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Luke Chang [:lchang] from comment #12) > [Is this code covered by automated tests?]: Yes. > [Has the fix been verified in Nightly?]: Verified locally. > [Needs manual test from QE? If yes, steps to reproduce]: No. Setting qe-verify- based on Luke's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: