Default password length to 20 characters
20 is the recommended minimum for 2026. The API and UI still accept shorter lengths if explicitly requested. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b082f6df5a
commit
ffc9102522
|
|
@ -370,7 +370,7 @@
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="pw-length">Length</label>
|
<label for="pw-length">Length</label>
|
||||||
<input type="number" id="pw-length" value="16" min="1" max="128">
|
<input type="number" id="pw-length" value="20" min="1" max="128">
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="pw-charset">Charset</label>
|
<label for="pw-charset">Charset</label>
|
||||||
|
|
@ -657,7 +657,7 @@
|
||||||
setToolsLoading(true);
|
setToolsLoading(true);
|
||||||
toolsOutput.textContent = 'Generating...';
|
toolsOutput.textContent = 'Generating...';
|
||||||
try {
|
try {
|
||||||
const len = document.getElementById('pw-length').value || 16;
|
const len = document.getElementById('pw-length').value || 20;
|
||||||
const cs = document.getElementById('pw-charset').value || 'alphanumeric';
|
const cs = document.getElementById('pw-charset').value || 'alphanumeric';
|
||||||
const noAmb = document.getElementById('pw-no-ambiguous').checked;
|
const noAmb = document.getElementById('pw-no-ambiguous').checked;
|
||||||
let url = origin + '/password?length=' + len + '&charset=' + cs;
|
let url = origin + '/password?length=' + len + '&charset=' + cs;
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h3>Quantum Password</h3>
|
<h3>Quantum Password</h3>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="field"><label for="pw-length">Length</label><input type="number" id="pw-length" value="16" min="1" max="128"></div>
|
<div class="field"><label for="pw-length">Length</label><input type="number" id="pw-length" value="20" min="1" max="128"></div>
|
||||||
<div class="field"><label for="pw-charset">Charset</label>
|
<div class="field"><label for="pw-charset">Charset</label>
|
||||||
<select id="pw-charset"><option value="alphanumeric">Alphanumeric</option><option value="full">Full (+ symbols)</option><option value="hex">Hex</option></select>
|
<select id="pw-charset"><option value="alphanumeric">Alphanumeric</option><option value="full">Full (+ symbols)</option><option value="hex">Hex</option></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -250,7 +250,7 @@
|
||||||
document.getElementById('btn-password').addEventListener('click', async () => {
|
document.getElementById('btn-password').addEventListener('click', async () => {
|
||||||
disableAll(true); outPw.className = 'output copyable loading'; outPw.textContent = 'Generating...';
|
disableAll(true); outPw.className = 'output copyable loading'; outPw.textContent = 'Generating...';
|
||||||
try {
|
try {
|
||||||
const len = document.getElementById('pw-length').value || 16;
|
const len = document.getElementById('pw-length').value || 20;
|
||||||
const cs = document.getElementById('pw-charset').value || 'alphanumeric';
|
const cs = document.getElementById('pw-charset').value || 'alphanumeric';
|
||||||
const noAmb = document.getElementById('pw-no-ambiguous').checked;
|
const noAmb = document.getElementById('pw-no-ambiguous').checked;
|
||||||
let url = origin + '/password?length=' + len + '&charset=' + cs;
|
let url = origin + '/password?length=' + len + '&charset=' + cs;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
//! Configurable length and character set (lowercase, uppercase, digits, symbols).
|
//! Configurable length and character set (lowercase, uppercase, digits, symbols).
|
||||||
|
|
||||||
/// Default password length.
|
/// Default password length.
|
||||||
pub const DEFAULT_LENGTH: usize = 16;
|
pub const DEFAULT_LENGTH: usize = 20;
|
||||||
|
|
||||||
/// Max length per request.
|
/// Max length per request.
|
||||||
pub const MAX_LENGTH: usize = 128;
|
pub const MAX_LENGTH: usize = 128;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue