Add honeypot field to login form: instant 24h IP ban on autofill
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ async function doLogin() {
|
||||
const res = await fetch(`${API}/api/auth/login`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ username, password }),
|
||||
body: JSON.stringify({ username, password, website: document.getElementById('hpWebsite').value }),
|
||||
});
|
||||
const data = await res.json().catch(() => ({}));
|
||||
if (res.ok && data.token) {
|
||||
|
||||
Reference in New Issue
Block a user