v3.1.7: Log-Passwort per HTTPS-Kopfzeile (POST-Inhalt kam nicht an)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nico Meister
2026-10-26 21:46:53 +01:00
co-authored by Claude Opus 5.5
parent 7d49f1f342
commit e9a7bfb712
4 changed files with 13 additions and 6 deletions
+9 -3
View File
@@ -261,13 +261,19 @@ static void worker(void *arg)
if (j == JOB_NONE || !buf) continue;
busy = true;
if (j == JOB_LOGIN) {
char form[160], enc[140];
// Passwort in der Kopfzeile X-Logs-Password (URL-kodiert, nur HTTPS). Als POST-Inhalt kam es nicht an:
// Der HTTP-Dienst des 3DS schickte 0 Bytes.
char enc[200];
url_encode(enc, sizeof(enc), password);
snprintf(form, sizeof(form), "password=%s", enc);
memset(password, 0, sizeof(password));
token[0] = 0;
u32 len;
u32 code = request("/mbmnet/logs/login", form, buf, 256, &len);
char date[64];
Result hrc = 0;
u32 code = https_request(server, "/mbmnet/logs/login", "", "X-Logs-Password", enc, buf, 256, &len, date, sizeof(date), &hrc);
memset(enc, 0, sizeof(enc));
if (date[0]) sync_clock(date);
if (!code) snprintf(status, sizeof(status), "Keine Verbindung (%08lX)", (unsigned long)hrc);
if (code == 200 && len == 64) {
memcpy(token, buf, 64);
token[64] = 0;