Files
Keysat fe66575ffe Harden login and make personal-best records self-correct
Login: add an in-memory per-IP throttle (8 failed attempts -> 15-min lockout, 429 + Retry-After), raise the change-password minimum to 8 with a 72-char cap, and apply the same minimum on the StartOS Set Login Password action.

Records: add a record_floor column for manually-pinned bests plus recomputeRecord(); the live record is now the direction-aware best of the best logged value and the floor, recomputed on entry edit/delete so it can drop again (never below the floor). Settings exposes the floor as an override and shows the live best as a placeholder.

Bump package 0.1.6:0 -> 0.1.7:0 and the service-worker cache to v7.
2026-06-15 13:22:41 -05:00

29 lines
2.1 KiB
TypeScript

import { IMPOSSIBLE, utils, VersionInfo } from '@start9labs/start-sdk'
import { store } from '../fileModels/store'
export const current = VersionInfo.of({
version: '0.1.7:0',
releaseNotes: {
en_US: 'Security hardening — login attempts are now rate-limited and the minimum password length was raised. Personal-best records now correct themselves when the session that set them is edited down or deleted, while any best you set by hand is kept.',
es_ES: 'Refuerzo de seguridad: los intentos de inicio de sesión ahora tienen límite de frecuencia y se aumentó la longitud mínima de la contraseña. Los récords personales se corrigen al editar a la baja o eliminar la sesión que los estableció, conservando cualquier récord fijado manualmente.',
de_DE: 'Sicherheitsverbesserungen: Anmeldeversuche sind jetzt ratenbegrenzt und die Mindestlänge des Passworts wurde erhöht. Persönliche Bestwerte korrigieren sich selbst, wenn die zugehörige Sitzung nach unten bearbeitet oder gelöscht wird, während manuell gesetzte Bestwerte erhalten bleiben.',
pl_PL: 'Wzmocnienie bezpieczeństwa: próby logowania są teraz ograniczane, a minimalna długość hasła została zwiększona. Rekordy osobiste same się korygują po obniżeniu lub usunięciu sesji, która je ustanowiła, zachowując rekordy ustawione ręcznie.',
fr_FR: "Renforcement de la sécurité : les tentatives de connexion sont désormais limitées et la longueur minimale du mot de passe a été augmentée. Les records personnels se corrigent lorsqu'on réduit ou supprime la séance qui les a établis, tout en conservant les records définis manuellement.",
},
migrations: {
up: async ({ effects }) => {
// Generate a random login password on first install so the app is never
// left on a known default. The user can change it via "Set Login Password".
const existing = await store.read().once()
if (!existing) {
const password = utils.getDefaultString({
charset: 'a-z,A-Z,2-9',
len: 16,
})
await store.write(effects, { password })
}
},
down: IMPOSSIBLE,
},
})