fix: Recovery-Rettungsweg härten (Watchdog-Cap, Konsole, Softap-Bit, Scan-Retry)
This commit is contained in:
+9
-2
@@ -44,9 +44,16 @@ endif()
|
||||
if(NOT DEFINED NINLIGHT_RECOVERY_PASSWORD)
|
||||
set(NINLIGHT_RECOVERY_PASSWORD "ninlight-recovery")
|
||||
endif()
|
||||
# Unlike NINLIGHT_WIFI_SSID, the recovery SSID is compared byte-for-byte against scan
|
||||
# results (nl_recovery.c) and must fit struct tls_bss_info_t::ssid[32]; empty would match
|
||||
# any hidden/empty-SSID AP in the scan, so it must not be empty either.
|
||||
string(LENGTH "${NINLIGHT_RECOVERY_SSID}" _nl_rec_ssid_len)
|
||||
if(_nl_rec_ssid_len EQUAL 0 OR _nl_rec_ssid_len GREATER 32)
|
||||
message(FATAL_ERROR "NINLIGHT_RECOVERY_SSID must be 1..32 characters")
|
||||
endif()
|
||||
string(LENGTH "${NINLIGHT_RECOVERY_PASSWORD}" _nl_rec_len)
|
||||
if(_nl_rec_len LESS 8)
|
||||
message(FATAL_ERROR "NINLIGHT_RECOVERY_PASSWORD needs at least 8 characters (WPA2)")
|
||||
if(_nl_rec_len LESS 8 OR _nl_rec_len GREATER 63)
|
||||
message(FATAL_ERROR "NINLIGHT_RECOVERY_PASSWORD must be 8..63 characters (WPA2)")
|
||||
endif()
|
||||
foreach(_v NINLIGHT_WIFI_SSID NINLIGHT_WIFI_PASSWORD NINLIGHT_AP_PASSWORD NINLIGHT_TOKEN
|
||||
NINLIGHT_RECOVERY_SSID NINLIGHT_RECOVERY_PASSWORD)
|
||||
|
||||
Reference in New Issue
Block a user