Skip to content

Commit

Permalink
Add autocomplete="off" for input type="password" to appease the scann…
Browse files Browse the repository at this point in the history
…ers (#56922)

* Add autocomplete="off" for input type="password" to appease the scanners

* Using new-password instead of off for the new/confirm passwords

* Setting more autoComplete="new-password" attributes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
kobelb and elasticmachine authored Feb 13, 2020
1 parent fef3a29 commit bc8a41a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class BasicLoginFormUI extends Component<Props, State> {
}
>
<EuiFieldText
autoComplete="off"
id="password"
name="password"
data-test-subj="loginPassword"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class ChangePasswordForm extends Component<Props, State> {
}
>
<EuiFieldText
autoComplete="off"
data-test-subj="currentPassword"
type="password"
value={this.state.currentPassword}
Expand Down Expand Up @@ -99,6 +100,7 @@ export class ChangePasswordForm extends Component<Props, State> {
}
>
<EuiFieldText
autoComplete="new-password"
data-test-subj="newPassword"
type="password"
value={this.state.newPassword}
Expand All @@ -118,6 +120,7 @@ export class ChangePasswordForm extends Component<Props, State> {
}
>
<EuiFieldText
autoComplete="new-password"
data-test-subj="confirmNewPassword"
type="password"
value={this.state.confirmPassword}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export class EditUserPage extends Component<Props, State> {
{...this.validator.validatePassword(this.state.user)}
>
<EuiFieldText
autoComplete="new-password"
data-test-subj="passwordInput"
name="password"
type="password"
Expand All @@ -218,6 +219,7 @@ export class EditUserPage extends Component<Props, State> {
{...this.validator.validateConfirmPassword(this.state.user)}
>
<EuiFieldText
autoComplete="new-password"
data-test-subj="passwordConfirmationInput"
onChange={this.onConfirmPasswordChange}
name="confirm_password"
Expand Down

0 comments on commit bc8a41a

Please sign in to comment.