Repository navigation
Security hardening + UX: PIN lockout, protected folders, keyboard play, mkdir/rename - #2
Merged
Merged
Conversation
Security (all verified live with curl against a running server): - fix: /api/auth/setup no longer lets an unauthenticated caller overwrite an existing PIN — changing the PIN now requires a valid session - login rate limiting: 30s lockout after 5 consecutive wrong PINs (a 4-digit PIN is brute-forceable in minutes without this); lockout message surfaced in the login UI - server-side PIN validation: 4-8 digits only - protected system folders (SDCARD root, .tmp_update, Roms, Saves, RetroArch, miyoo, App/WebDeck, BIOS, Icons) can no longer be deleted or renamed - getLocalIP: use net.IP.IsPrivate() — the old '172.' prefix wrongly matched public 172.x addresses outside 172.16/12 - http.Server with ReadHeaderTimeout (slowloris guard); streams unaffected User-friendliness: - play with the keyboard: arrows=D-pad, X=A, Z=B, S=X, A=Y, Q/E=L1/R1, W/R=L2/R2, Enter=START, Shift=SELECT, M=MENU; toggleable, never steals keys while typing in a field; mapping hint shown under the gamepad - file manager: New folder and Rename buttons (names validated server-side) - login: digit-only input filtering, proper autocomplete hints, real server error shown on lockout instead of a generic message - aria-labels/titles on icon-only buttons; last hardcoded French tooltip moved to i18n Tests: validPin, isProtectedPath, sanitizeName, loginLimiter (all green) Version 1.8; ARM binary + www bundle rebuilt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Lot de durcissement sécurité + améliorations d'ergonomie, avec tests fonctionnels réels (serveur lancé localement, chaque comportement vérifié au
curl). Version 1.8.🛡️ Sécurité / robustesse
/api/auth/setuppermettait à n'importe qui sur le réseau d'écraser un PIN existant sans authentification → changer le PIN exige désormais une session valide.SDCARD(racine),.tmp_update,Roms,Saves,Emu,RetroArch,miyoo,App,App/WebDeck,BIOS,Iconsne peuvent plus être supprimés ni renommés.getLocalIP: le préfixe"172."acceptait des IP publiques hors 172.16/12 → remplacé parnet.IP.IsPrivate()(RFC 1918 exact).http.ServeravecReadHeaderTimeout(anti-slowloris) ; les flux longue durée (MJPEG, WebSocket) ne sont pas affectés.😊 Ergonomie
/api/mkdir,/api/rename), noms validés côté serveur (sanitizeName: pas de/, pas de traversée, pas de noms cachés).autocomplete, vrai message serveur affiché lors du verrouillage.aria-label/titlesur les boutons-icônes ; dernier tooltip français en dur déplacé dans l'i18n (FR/EN).✅ Vérification
Tests fonctionnels live (serveur + fausse SD +
curl) : PIN invalide refusé · écrasement sans session → 401 · changement avec session → OK · mkdir/rename OK ·../evilrefusé · suppression deRomsbloquée · lockout après 5 échecs (même avec le bon PIN).Binaire ARM et bundle web du package régénérés.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XmGfBz6k1Z8YFPitFjuEGp
Generated by Claude Code