Added limit to length of password when autofilling if max password length exists (#918)

This commit is contained in:
Perry Trinh 2019-04-20 18:17:39 -07:00 committed by Kyle Spearrin
parent c5f02f5cfb
commit bfb87dbd15
1 changed files with 2 additions and 1 deletions

View File

@ -392,7 +392,8 @@ export default class AutofillService implements AutofillServiceInterface {
filledFields[p.opid] = p;
fillScript.script.push(['click_on_opid', p.opid]);
fillScript.script.push(['focus_by_opid', p.opid]);
fillScript.script.push(['fill_by_opid', p.opid, login.password]);
const passwordLength: number = p.maxLength && p.maxLength > 0 ? p.maxLength : login.password.length;
fillScript.script.push(['fill_by_opid', p.opid, login.password.substring(0, passwordLength)]);
});
fillScript = this.setFillScriptForFocus(filledFields, fillScript);