attempt to fix: bad disk units are perpetually banned

This commit is contained in:
zefie
2022-02-06 11:34:55 -05:00
parent 931560898b
commit 622698ee66
3 changed files with 10 additions and 3 deletions

View File

@@ -2,7 +2,10 @@ var minisrv_service_file = true;
ssid_sessions[socket.ssid].disableLockdown();
data += `<html>
headers = `200 OK
Content-type: text/html`;
data = `<html>
<head>
<display switchtowebmode nooptions nostatus skipback clearback> <title>Please Call</title>
</head>

View File

@@ -18,6 +18,7 @@ class WTVClientSessionData {
lockdown = null;
lockdownReason = null;
lockdownWhitelist = null;
baddisk = false;
clientAddress = null;
constructor(minisrv_config, ssid) {

View File

@@ -388,8 +388,11 @@ async function processURL(socket, request_headers) {
}
if (ssid_sessions[socket.ssid].get("wtv-my-disk-sucks-sucks-sucks")) {
// psuedo lockdown, will unlock on the disk warning page, but prevents minisrv access until they read the error
ssid_sessions[socket.ssid].lockdown = true;
if (!ssid_sessions[socket.ssid].baddisk) {
// psuedo lockdown, will unlock on the disk warning page, but prevents minisrv access until they read the error
ssid_sessions[socket.ssid].lockdown = true;
ssid_sessions[socket.ssid].baddisk = true;
}
}
// Check URL for :/, but not :// (to differentiate wtv urls)