Nightly build fixes 20241009 (#1613)

* Nightly build fixes.
Restarting the nightly build with many changes resulted in updates
failing to be applied on some hardware platforms. This resulted in nodes
reverting to first use state. These changes fixes those problems.

* Fix authentication
This commit is contained in:
Tim Wilkinson 2024-10-09 14:45:37 -07:00 committed by GitHub
parent 976c3ec1e1
commit 4e196969d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 8 deletions

View File

@ -25,7 +25,7 @@ CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_bullet-m-xw=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_lap-120=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_lap-120=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_litebeam-ac-gen2=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_litebeam-ac-gen2=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_litebeam-ac-lr=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_litebeam-ac-lr=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-2ac-13=y #CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-2ac-13=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac-gen2=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac-gen2=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac=y
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac-xc=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac-xc=y

View File

@ -437,14 +437,16 @@ global.handle_request = function(env)
if (pageCache[tpath] || fs.access(tpath)) { if (pageCache[tpath] || fs.access(tpath)) {
auth.runAuthentication(env); auth.runAuthentication(env);
if (secured && !auth.isAdmin && config.authenable) { if (config.authenable && !auth.isAdmin) {
if (secured) {
uhttpd.send("Status: 401 Unauthorized\r\n\r\n"); uhttpd.send("Status: 401 Unauthorized\r\n\r\n");
return; return;
} }
if (env.REQUEST_METHOD !== "GET" && config.authenable && !(auth.isAdmin || auth.isFirstUse)) { if (env.REQUEST_METHOD !== "GET" && configuration.isConfigured() && page !== "authenticate") {
uhttpd.send("Status: 401 Unauthorized\r\n\r\n"); uhttpd.send("Status: 401 Unauthorized\r\n\r\n");
return; return;
} }
}
const args = {}; const args = {};
if (env.CONTENT_TYPE === "application/x-www-form-urlencoded") { if (env.CONTENT_TYPE === "application/x-www-form-urlencoded") {
let b = ""; let b = "";

View File

@ -229,6 +229,8 @@ if aredn.info.get_nvram("configured") ~= "0" then
-- Reboot when necessary -- Reboot when necessary
if nixio.fs.stat("/tmp/reboot-required") then if nixio.fs.stat("/tmp/reboot-required") then
print "Rebooting node" print "Rebooting node"
os.execute("/sbin/mount_root done")
os.execute("/bin/sync")
os.execute("/sbin/reboot") os.execute("/sbin/reboot")
end end
end end