mirror of https://github.com/aredn/aredn.git
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:
parent
976c3ec1e1
commit
4e196969d7
|
@ -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_litebeam-ac-gen2=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=y
|
||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac-xc=y
|
||||
|
|
|
@ -437,14 +437,16 @@ global.handle_request = function(env)
|
|||
|
||||
if (pageCache[tpath] || fs.access(tpath)) {
|
||||
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");
|
||||
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");
|
||||
return;
|
||||
}
|
||||
}
|
||||
const args = {};
|
||||
if (env.CONTENT_TYPE === "application/x-www-form-urlencoded") {
|
||||
let b = "";
|
||||
|
|
|
@ -229,6 +229,8 @@ if aredn.info.get_nvram("configured") ~= "0" then
|
|||
-- Reboot when necessary
|
||||
if nixio.fs.stat("/tmp/reboot-required") then
|
||||
print "Rebooting node"
|
||||
os.execute("/sbin/mount_root done")
|
||||
os.execute("/bin/sync")
|
||||
os.execute("/sbin/reboot")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue