BUG 414295
Needs ReviewPublic

Authored by malibushko on Mar 20 2020, 12:28 AM.

Details

Reviewers
allknow
Summary

BUG 414295
The problem is some sites does not provide 'name' HTML attribute for form inputs.
The folliwng attribute is required for 'completeFormData' Falkon script, but
if the name is empty, the key (see source code) is also empty, and the expression
(name == key) is always evaluates to true, which leads to misfilling the form.
To fix this we just need to check that 'name' is not empty.
To test enter https://my.amfoss.in/login (enter somethink and click save). There must not be any fields filled.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
malibushko created this revision.Mar 20 2020, 12:28 AM
Restricted Application added a subscriber: falkon. · View Herald TranscriptMar 20 2020, 12:28 AM
malibushko requested review of this revision.Mar 20 2020, 12:28 AM
allknow requested changes to this revision.Mar 21 2020, 1:19 AM
allknow removed a reviewer: SGOrava.
allknow added a subscriber: allknow.
This comment was removed by allknow.
This revision now requires changes to proceed.Mar 21 2020, 1:19 AM

" if (input.name == key&&input.name==null) {"

I think this is more better!
Because That causes an error. If you do that, you will not be able to automatically log in with the toolbar.

malibushko updated this revision to Diff 78180.Mar 21 2020, 5:17 PM

I tested it a little bit, and found out that the problem was not caused by 'name' attribute, but by 'key' - it is empty if an appropriate attribute is not present.
Now to check enter to https://my.amfoss.in/login (enter somethink and click save) and see there is not input
Then you can check it at any site (I choosed phabricator) - it should be autocompleted automatically