Compare commits

...
3 Commits
Author SHA1 Message Date
burrow-dev 96774f9f5b Merge pull request #1 from Snipzil/main
feat(auth): add weak password error message & fix URL load fails on captcha
2026-10-22 03:39:12 +03:00
Snipzil 3cb8764603 fix(app): handle captcha URL load failures
Add error handling to the captcha URL loading process to prevent
unhandled promise rejections. If the URL fails to load, the captcha
answer is cleared and the window is closed if it hasn't been destroyed.
2026-10-21 20:34:59 -04:00
Snipzil ab8bfd5a9d feat(auth): add weak password error message 2026-10-18 20:12:17 -04:00
2 changed files with 7 additions and 1 deletions

No files matched your search

+1
View File
@@ -503,6 +503,7 @@
username_taken: "That username is already taken.",
name_not_allowed: "That username is not allowed.",
invalid_password: "Passwords need 10 characters or more, with a capital letter, a small letter and a digit.",
weak_password: "That password is too easy to guess: it is a common one, or has your username in it.",
choose_animal: "Choose an animal first.",
too_many_registrations: "Too many accounts were created from your address. Try again in an hour.",
address_banned: "Your address is banned.",
+6 -1
View File
@@ -420,7 +420,12 @@ ipcMain.handle("captcha", (event, serverUrl, action) => new Promise(resolve => {
captchaServer = null;
answer("");
});
box.loadURL(new URL(`/captcha?action=${action === "signup" ? "signup" : "login"}`, server).href);
box.loadURL(new URL(`/captcha?action=${action === "signup" ? "signup" : "login"}`, server).href).catch(() => {
answer("");
if (!box.isDestroyed()) {
box.close();
}
});
}));
// what the client's processes use: the game is the "Pepper Plugin" one.