Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit a1d9dca

Browse files
Merge pull request #38 from silinternational/autocomplete-no-no
user and pass inputs could've been a little more secure.
2 parents 1743d9d + 7aab392 commit a1d9dca

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

themes/material/core/loginuserpass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function onRecaptchaLoad() {
4444
<main class="mdl-layout__content" layout-children="column" child-spacing="center">
4545
<?php include __DIR__ . '/../common-announcement.php' ?>
4646

47-
<form method="post">
47+
<form method="post" autocomplete="off">
4848
<input type="hidden" name="AuthState"
4949
value="<?= htmlentities($this->data['stateparams']['AuthState']) ?>" />
5050
<?php
@@ -73,8 +73,8 @@ function onRecaptchaLoad() {
7373
$username = htmlentities($this->data['username'] ?? null);
7474
?>
7575
<input type="text" name="username" class="mdl-textfield__input"
76-
value="<?= $username ?>"
77-
<?= empty($username) ? 'autofocus' : '' ?> id="username"/>
76+
value="<?= $username ?>" <?= empty($username) ? 'autofocus' : '' ?>
77+
id="username"/>
7878
</div>
7979

8080
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">

themes/material/mfa/prompt-for-mfa-backupcode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616
</header>
1717
<main class="mdl-layout__content" layout-children="column">
18-
<form layout-children="column" method="post">
18+
<form layout-children="column" method="post" autocomplete="off">
1919
<div class="mdl-card mdl-shadow--8dp">
2020
<div class="mdl-card__media white-bg margin" layout-children="column">
2121
<img src="mfa-backupcode.svg"
@@ -40,7 +40,7 @@
4040
<?= $this->t('{material:mfa:backupcode_input}') ?>
4141
</label>
4242
<input name="mfaSubmission" class="mdl-textfield__input" autofocus
43-
id="mfaSubmission" autocomplete="off" />
43+
id="mfaSubmission" />
4444
</div>
4545
</div>
4646

themes/material/mfa/prompt-for-mfa-totp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616
</header>
1717
<main class="mdl-layout__content" layout-children="column">
18-
<form layout-children="column" method="post">
18+
<form layout-children="column" method="post" autocomplete="off">
1919
<div class="mdl-card mdl-shadow--8dp">
2020
<div class="mdl-card__media white-bg margin" layout-children="column">
2121
<img src="mfa-totp.svg" alt="<?= $this->t('{material:mfa:totp_icon}') ?>">
@@ -39,7 +39,7 @@
3939
<?= $this->t('{material:mfa:totp_input}') ?>
4040
</label>
4141
<input name="mfaSubmission" class="mdl-textfield__input" autofocus
42-
id="mfaSubmission" autocomplete="off" />
42+
id="mfaSubmission" />
4343
</div>
4444
</div>
4545

0 commit comments

Comments
 (0)