attempt to fix: bad disk units are perpetually banned
This commit is contained in:
@@ -2,7 +2,10 @@ var minisrv_service_file = true;
|
|||||||
|
|
||||||
ssid_sessions[socket.ssid].disableLockdown();
|
ssid_sessions[socket.ssid].disableLockdown();
|
||||||
|
|
||||||
data += `<html>
|
headers = `200 OK
|
||||||
|
Content-type: text/html`;
|
||||||
|
|
||||||
|
data = `<html>
|
||||||
<head>
|
<head>
|
||||||
<display switchtowebmode nooptions nostatus skipback clearback> <title>Please Call</title>
|
<display switchtowebmode nooptions nostatus skipback clearback> <title>Please Call</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class WTVClientSessionData {
|
|||||||
lockdown = null;
|
lockdown = null;
|
||||||
lockdownReason = null;
|
lockdownReason = null;
|
||||||
lockdownWhitelist = null;
|
lockdownWhitelist = null;
|
||||||
|
baddisk = false;
|
||||||
clientAddress = null;
|
clientAddress = null;
|
||||||
|
|
||||||
constructor(minisrv_config, ssid) {
|
constructor(minisrv_config, ssid) {
|
||||||
|
|||||||
@@ -388,8 +388,11 @@ async function processURL(socket, request_headers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ssid_sessions[socket.ssid].get("wtv-my-disk-sucks-sucks-sucks")) {
|
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
|
if (!ssid_sessions[socket.ssid].baddisk) {
|
||||||
ssid_sessions[socket.ssid].lockdown = true;
|
// 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)
|
// Check URL for :/, but not :// (to differentiate wtv urls)
|
||||||
|
|||||||
Reference in New Issue
Block a user