Skip to content

Commit

Permalink
Disable autocomplete for password fields (#16544)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Aug 9, 2024
1 parent 1f00245 commit 8d403cd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
<div class="mb-3 col-md-6" asp-validation-class-for="Password">
<label asp-for="Password" class="form-label">@T["Password"]</label>
<div class="input-group">
<input asp-for="Password" class="form-control" data-bs-toggle="popover" data-bs-placement="top" data-trigger="focus" data-title="@T["Password strength"]" data-bs-content="@passwordTooltip" required pattern="@passwordRegex" />
<input asp-for="Password" class="form-control" autocomplete="new-password" data-bs-toggle="popover" data-bs-placement="top" data-trigger="focus" data-title="@T["Password strength"]" data-bs-content="@passwordTooltip" required pattern="@passwordRegex" />
<button tabindex="-1" class="btn btn-secondary" type="button" id="togglePassword"><i class="icon fa fa-eye"></i></button>
</div>
<div id="passwordStrength"></div>
Expand All @@ -233,7 +233,7 @@
<div class="mb-3 col-md-6" asp-validation-class-for="PasswordConfirmation">
<label asp-for="PasswordConfirmation" class="form-label">@T["Password Confirmation"]</label>
<div class="input-group">
<input asp-for="PasswordConfirmation" class="form-control" title="@passwordTooltip" required pattern="@passwordRegex" />
<input asp-for="PasswordConfirmation" class="form-control" autocomplete="new-password" title="@passwordTooltip" required pattern="@passwordRegex" />
<button tabindex="-1" class="btn btn-secondary" type="button" id="togglePasswordConfirmation"><i class="icon fa fa-eye"></i></button>
</div>
<span asp-validation-for="PasswordConfirmation" class="text-danger"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<div class="mb-3">
<label asp-for="CurrentPassword" class="col-md-4 form-label">@T["Current password"]</label>
<div class="col-md-8">
<input asp-for="CurrentPassword" class="form-control" autofocus />
<input asp-for="CurrentPassword" class="form-control" autofocus autocomplete="new-password" />
<span asp-validation-for="CurrentPassword" class="text-danger"></span>
</div>
</div>
<div class="mb-3">
<label asp-for="Password" class="col-md-4 form-label">@T["New password"]</label>
<div class="col-md-8">
<input asp-for="Password" class="form-control" />
<input asp-for="Password" class="form-control" autocomplete="new-password" />
<div id="passwordStrength"></div>
<span asp-validation-for="Password" class="text-danger"></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

<div class="mb-3">
<label asp-for="Password" class="form-label">@T["Password"]</label>
<input asp-for="Password" class="form-control" />
<input asp-for="Password" class="form-control" autocomplete="new-password" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>

<div class="mb-3">
<label asp-for="ConfirmPassword" class="form-label">@T["Confirm password"]</label>
<input asp-for="ConfirmPassword" class="form-control" />
<input asp-for="ConfirmPassword" class="form-control" autocomplete="new-password" />
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

<div class="mb-3">
<label asp-for="NewPassword" class="form-label">@T["New password"]</label>
<input asp-for="NewPassword" class="form-control" />
<input asp-for="NewPassword" class="form-control" autocomplete="new-password" />
<div id="passwordStrength"></div>
<span asp-validation-for="NewPassword" class="text-danger"></span>
</div>

<div class="mb-3">
<label asp-for="PasswordConfirmation" class="form-label">@T["New password confirmation"]</label>
<input asp-for="PasswordConfirmation" class="form-control" />
<input asp-for="PasswordConfirmation" class="form-control" autocomplete="new-password" />
<span asp-validation-for="PasswordConfirmation" class="text-danger"></span>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<label asp-for="Password" class="form-label">@T["Password"]</label>
<div class="input-group col-md-4">
<span class="input-group-text password-toggle-button"><span class="toggle-icon fas fa-eye prefix"></span></span>
<input asp-for="Password" type="password" class="form-control password-input-field" placeholder="@T["Password"]" />
<input asp-for="Password" type="password" class="form-control password-input-field" placeholder="@T["Password"]" autocomplete="new-password" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
</div>
Expand All @@ -40,7 +40,7 @@
<label asp-for="PasswordConfirmation" class="sr-only">@T["Password Confirmation"]</label>
<div class="input-group col-md-4">
<span class="input-group-text password-confirmation-toggle-button"><span class="toggle-icon fas fa-eye prefix"></span></span>
<input asp-for="PasswordConfirmation" type="password" class="form-control password-confirmation-input-field" placeholder="@T["Password confirmation"]" />
<input asp-for="PasswordConfirmation" type="password" class="form-control password-confirmation-input-field" autocomplete="new-password" placeholder="@T["Password confirmation"]" />
<span asp-validation-for="PasswordConfirmation" class="text-danger"></span>
</div>

Expand Down

0 comments on commit 8d403cd

Please sign in to comment.