From 742bcec915c870289eb04430d9d2ae6c613e216a Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 8 May 2017 12:07:36 +0100 Subject: [PATCH] Require a password to enable OTA mode --- door_wiegand.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/door_wiegand.ino b/door_wiegand.ino index b2ae15f..ee8b2e0 100644 --- a/door_wiegand.ino +++ b/door_wiegand.ino @@ -90,10 +90,13 @@ unsigned long ntp_lasttry = 0; bool ota_enabled = false; - +/* User requests to enable OTA mode */ void enable_ota(void) { if (!ota_enabled) { + if (!server.authenticate(www_username, www_password)) + return server.requestAuthentication(); + Serial.println("Enabling OTA Mode."); ArduinoOTA.begin(); ota_enabled = true; -- 1.8.3.1