Add spellcheck="false" on some login text fields to avoid data leaks to spell checking services

Ref: https://www.otto-js.com/news/article/chrome-and-edge-enhanced-spellcheck-features-expose-pii-even-your-passwords

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2023-01-16 12:43:54 +04:00
parent 2f2f7d4c92
commit 6d42cd8017
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
5 changed files with 5 additions and 5 deletions

View File

@ -59,7 +59,7 @@ if (isset($_POST['user'])) {
}
echo '<form action="signon.php" method="post">
Username: <input type="text" name="user" autocomplete="username"><br>
Username: <input type="text" name="user" autocomplete="username" spellcheck="false"><br>
Password: <input type="password" name="password" autocomplete="current-password" spellcheck="false"><br>
Host: (will use the one from config.inc.php by default)
<input type="text" name="host"><br>

View File

@ -76,7 +76,7 @@
{% trans 'Username:' %}
</label>
<div class="col-sm-8">
<input type="text" name="pma_username" id="input_username" value="{{ default_user }}" class="form-control" autocomplete="username">
<input type="text" name="pma_username" id="input_username" value="{{ default_user }}" class="form-control" autocomplete="username" spellcheck="false">
</div>
</div>

View File

@ -8,7 +8,7 @@
<option value="userdefined"{{ pred_username is null or pred_username == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option>
</select>
</span>
<input type="text" name="username" id="pma_username" class="autofocus" maxlength="{{ username_length }}" title="{% trans 'User name' %}"
<input type="text" name="username" id="pma_username" class="autofocus" spellcheck="false" maxlength="{{ username_length }}" title="{% trans 'User name' %}"
{%- if username is not empty %} value="{{ new_username is not null ? new_username : username }}"{% endif -%}
{{- pred_username is null or pred_username == 'userdefined' ? ' required' }}>

View File

@ -21,7 +21,7 @@
<option value="userdefined"{{ predefined_username == 'userdefined' ? ' selected' }}>{% trans 'Use text field:' %}</option>
</select>
</span>
<input type="text" name="username" id="pma_username" maxlength="{{ username_length }}" title="{% trans 'User name' %}" value="{{ username }}">
<input type="text" name="username" id="pma_username" maxlength="{{ username_length }}" title="{% trans 'User name' %}" value="{{ username }}" spellcheck="false">
</div>
<div class="item">

View File

@ -221,7 +221,7 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
$this->assertStringContainsString(
'<input type="text" name="pma_username" id="input_username" ' .
'value="pmauser" class="form-control" autocomplete="username">',
'value="pmauser" class="form-control" autocomplete="username" spellcheck="false">',
$result
);