Unlock window works with password managers: the form drops autocomplete off and carries the agent's email in a hidden username field, so Bitwarden and the like fill the ITFlow password they keep for signing in, as on the sign-in page; 26.12.5 changelog

This commit is contained in:
johnnyq
2026-12-02 23:05:42 -05:00
parent 2d2574ab49
commit ea83e249d1
2 changed files with 7 additions and 4 deletions

View File

@@ -119,7 +119,7 @@ if ($itflow_vault_locked) { ?>
<h5 class="modal-title"><i class="fas fa-fw fa-lock me-2"></i>Unlock Your Credentials</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form data-vault-unlock-form autocomplete="off">
<form data-vault-unlock-form>
<div class="modal-body">
<p><?= escapeHtml(ucfirst(vaultLockedReason())) ?>, so your usernames, passwords and 2FA codes are locked. <?= $itflow_vault_passkeys ? 'Unlock them with a passkey or your ITFlow password' : 'Type your ITFlow password to unlock them' ?> until you sign out.</p>
<?php if ($itflow_vault_seal !== '') { ?>
@@ -132,10 +132,12 @@ if ($itflow_vault_locked) { ?>
<div class="text-center small text-body-secondary my-3">or type your password</div>
</div>
<?php } ?>
<label class="form-label">Your password <strong class="text-danger">*</strong></label>
<!-- Whose password it is, so a password manager offers the one it keeps for signing in here (as join.php does) -->
<input type="text" class="d-none" name="username" value="<?= escapeHtml($session_email ?? '') ?>" autocomplete="username" aria-hidden="true" tabindex="-1">
<label class="form-label" for="vaultUnlockPassword">Your password <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-lock"></i></span>
<input type="password" class="form-control" name="password" autocomplete="current-password" required>
<input type="password" class="form-control" name="password" id="vaultUnlockPassword" autocomplete="current-password" required>
</div>
</div>
<div class="modal-footer">