alexandregz / twofactor_gauthenticator

This RoundCube plugin adds the 2-step verification(OTP) to the login proccess
MIT License
214 stars 74 forks source link

Secret input field is autocompleted by the browser #151

Closed alexxr6 closed 2 years ago

alexxr6 commented 2 years ago

Hello Team,

I figured the secret input field is autocompleted by the browser with the saved password of the email account. By having this field completed automatically, it is not possible to generate all codes (by clicking on the "Fill all fields" button) until I remove the content.

This can prevent some misunderstanding on the part of some users.

To disable the autocompletion I changed the following line in twofactor_gauthenticator.php : $input_descsecret = new html_inputfield(array('name' => $field_id, 'id' => $field_id, 'size' => 60, 'type' => 'password', 'value' => $data['secret'])); To $input_descsecret = new html_inputfield(array('name' => $field_id, 'id' => $field_id, 'size' => 60, 'type' => 'password', 'value' => $data['secret'], 'autocomplete' => 'new-password'));

Kind regards, Alexandre