You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5703fd2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(web): close unauth upload/OTA, password leak and SSID XSS
The password protection was implemented as server middleware, which only
wraps the request handler - ESPAsyncWebServer runs the upload/body callback
while the body streams in, *before* the middleware. So /update (OTA flash),
/upload (NVS restore) and POST /explorer (SD write) were reachable
unauthenticated, i.e. an unauthenticated firmware flash = remote code
execution even with a web password set.
- add Web_RequestAuthorized() and enforce it inside the OTA, NVS-restore and
explorer upload handlers (re-checked on every chunk) plus their completion
handlers, so nothing touches flash/NVS/SD before auth.
- GET /security no longer returns the device password in cleartext (it is the
shared web/FTP/WebDAV credential); the UI field is now write-only and gets
an explicit "disable protection" switch so an empty save can't silently turn
protection off. Locales + demo mock updated.
- escape scanned SSIDs: build the AP-setup WiFi list via DOM/textContent
instead of innerHTML, and JSON-escape SSID/BSSID server-side, closing the
DOM-XSS on the page that takes the WiFi password.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: html/locales/de.json
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -210,9 +210,12 @@
210
210
"title": "Geräte-Passwort",
211
211
"password": {
212
212
"title": "Passwort",
213
-
"placeholder": "Leer lassen, um den Schutz zu deaktivieren",
214
-
"desc": "Ein gemeinsames Passwort für alles: Webinterface, FTP und WebDAV. Bei FTP und WebDAV ist der Benutzername egal – jeder Benutzername funktioniert, es zählt nur dieses Passwort. Nach dem Anmelden im Webinterface bleibt man 90 Tage eingeloggt; im Hotspot-Modus ist der Schutz inaktiv. Leer lassen, um den Schutz überall (Webinterface, FTP, WebDAV) zu deaktivieren.",
215
-
"show": "Passwort anzeigen/verbergen"
213
+
"placeholder": "Passwort festlegen",
214
+
"keep": "Leer lassen, um das aktuelle Passwort zu behalten",
215
+
"desc": "Ein gemeinsames Passwort für alles: Webinterface, FTP und WebDAV. Bei FTP und WebDAV ist der Benutzername egal – jeder Benutzername funktioniert, es zählt nur dieses Passwort. Nach dem Anmelden im Webinterface bleibt man 90 Tage eingeloggt; im Hotspot-Modus ist der Schutz inaktiv. Das Passwort wird nie wieder angezeigt; leer lassen, um es zu behalten. Zum Deaktivieren überall „Passwortschutz deaktivieren“ anhaken und speichern.",
216
+
"show": "Passwort anzeigen/verbergen",
217
+
"disable": "Passwortschutz deaktivieren",
218
+
"nochange": "Nichts zu speichern: neues Passwort eingeben oder „Passwortschutz deaktivieren“ anhaken."
Copy file name to clipboardExpand all lines: html/locales/en.json
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -210,9 +210,12 @@
210
210
"title": "Device password",
211
211
"password": {
212
212
"title": "Password",
213
-
"placeholder": "Leave empty to disable protection",
214
-
"desc": "One shared password for everything: web interface, FTP and WebDAV. For FTP and WebDAV the username does not matter - any username works, only this password is checked. Once logged in to the web interface you stay logged in for 90 days; protection is inactive in hotspot mode. Leave empty to disable protection everywhere (web interface, FTP, WebDAV).",
215
-
"show": "Show/hide password"
213
+
"placeholder": "Set a password",
214
+
"keep": "Leave empty to keep the current password",
215
+
"desc": "One shared password for everything: web interface, FTP and WebDAV. For FTP and WebDAV the username does not matter - any username works, only this password is checked. Once logged in to the web interface you stay logged in for 90 days; protection is inactive in hotspot mode. The password is never shown again; leave the field empty to keep it. To turn protection off everywhere, tick “Disable password protection” and save.",
216
+
"show": "Show/hide password",
217
+
"disable": "Disable password protection",
218
+
"nochange": "Nothing to save: enter a new password or tick “Disable password protection”."
Copy file name to clipboardExpand all lines: html/locales/fr.json
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -203,9 +203,12 @@
203
203
"title": "Mot de passe de l'appareil",
204
204
"password": {
205
205
"title": "Mot de passe",
206
-
"placeholder": "Laisser vide pour désactiver la protection",
207
-
"desc": "Un seul mot de passe partagé pour tout : interface web, FTP et WebDAV. Pour le FTP et le WebDAV, le nom d'utilisateur n'a pas d'importance - n'importe quel nom fonctionne, seul ce mot de passe est vérifié. Une fois connecté à l'interface web, vous restez connecté pendant 90 jours ; la protection est inactive en mode hotspot. Laisser vide pour désactiver la protection partout (interface web, FTP, WebDAV).",
208
-
"show": "Afficher/masquer le mot de passe"
206
+
"placeholder": "Définir un mot de passe",
207
+
"keep": "Laisser vide pour conserver le mot de passe actuel",
208
+
"desc": "Un seul mot de passe partagé pour tout : interface web, FTP et WebDAV. Pour le FTP et le WebDAV, le nom d'utilisateur n'a pas d'importance - n'importe quel nom fonctionne, seul ce mot de passe est vérifié. Une fois connecté à l'interface web, vous restez connecté pendant 90 jours ; la protection est inactive en mode hotspot. Le mot de passe n'est jamais réaffiché ; laissez le champ vide pour le conserver. Pour tout désactiver, cochez « Désactiver la protection par mot de passe » puis enregistrez.",
209
+
"show": "Afficher/masquer le mot de passe",
210
+
"disable": "Désactiver la protection par mot de passe",
211
+
"nochange": "Rien à enregistrer : saisissez un nouveau mot de passe ou cochez « Désactiver la protection par mot de passe »."
0 commit comments