fix(wifi): AP-Daten nach dem Onboarding zuruecksetzen, Netz trotz abgelehntem AP-Aufbau
This commit is contained in:
+8
-1
@@ -728,11 +728,18 @@ static void test_standalone_length_limits(void)
|
||||
{
|
||||
char body[256], pw[80], ss[48];
|
||||
|
||||
memset(pw, 'p', 64); pw[64] = '\0';
|
||||
/* 63 ist die Obergrenze, nicht 64: eine WPA2-ASCII-Passphrase ist hoechstens 63 Zeichen
|
||||
* lang, und ein vom Funkteil abgelehnter AP-Aufbau waere hier eine Sackgasse. */
|
||||
memset(pw, 'p', 63); pw[63] = '\0';
|
||||
snprintf(body, sizeof body, "{\"type\":\"standalone\",\"enabled\":true,\"password\":\"%s\"}", pw);
|
||||
call(NL_HTTP_PUT, "/api/v1/system/settings", TOKEN, body);
|
||||
TEST_ASSERT_EQUAL_INT(202, resp.status);
|
||||
TEST_ASSERT_EQUAL_STRING(pw, fake_standalone_pass);
|
||||
memset(pw, 'p', 64); pw[64] = '\0';
|
||||
snprintf(body, sizeof body, "{\"type\":\"standalone\",\"enabled\":true,\"password\":\"%s\"}", pw);
|
||||
call(NL_HTTP_PUT, "/api/v1/system/settings", TOKEN, body);
|
||||
TEST_ASSERT_EQUAL_INT(400, resp.status);
|
||||
TEST_ASSERT_NULL(strstr(resp.body, pw));
|
||||
memset(pw, 'p', 65); pw[65] = '\0';
|
||||
snprintf(body, sizeof body, "{\"type\":\"standalone\",\"enabled\":true,\"password\":\"%s\"}", pw);
|
||||
call(NL_HTTP_PUT, "/api/v1/system/settings", TOKEN, body);
|
||||
|
||||
Reference in New Issue
Block a user