Merge pull request #3536 from Aircoookie/ntp_errorchecking

NTP validation, and rejecting malformed responses (related to #3515)
This commit is contained in:
Frank
2023-11-20 21:13:35 +01:00
parent 6426f3b934
commit cc8d4e3969
5 changed files with 33 additions and 10 deletions

View File

@@ -426,7 +426,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
//start ntp if not already connected
if (ntpEnabled && WLED_CONNECTED && !ntpConnected) ntpConnected = ntpUdp.begin(ntpLocalPort);
ntpLastSyncTime = 0; // force new NTP query
ntpLastSyncTime = NTP_NEVER; // force new NTP query
longitude = request->arg(F("LN")).toFloat();
latitude = request->arg(F("LT")).toFloat();