* v0.9.55

- CGI Support (eg PHP, Perl, etc)
- Slight PC Admin updates
- Numerous bug fixes
- Security updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
zefie
2025-01-03 12:49:50 -05:00
committed by GitHub
parent 9314705def
commit 907cec23c2
28 changed files with 1637 additions and 576 deletions

View File

@@ -15,24 +15,7 @@ if (auth === true) {
if (wtva.checkPassword(password)) {
if (request_headers.query.ssid) {
var ssid = request_headers.query.ssid.toLowerCase();
if (ssid == socket.ssid) {
var nobanself = true;
} else {
var fake_config = wtvshared.getUserConfig();
if (!fake_config.config) fake_config.config = {};
if (!fake_config.config.ssid_block_list) fake_config.config.ssid_block_list = [];
var entry_exists = false;
Object.keys(fake_config.config.ssid_block_list).forEach(function (k) {
if (fake_config.config.ssid_block_list[k] == ssid) {
entry_exists = true;
}
});
if (!entry_exists) {
fake_config.config.ssid_block_list.push(ssid);
wtvshared.writeToUserConfig(fake_config);
reloadConfig();
}
}
var result = wtva.banSSID(ssid, socket.ssid);
}
headers = `200 OK
Content-Type: text/html
@@ -61,13 +44,16 @@ wtv-expire-all: wtv-admin:/ban`;
<input type="submit" value="Ban SSID">
</form><br><br>`
if (request_headers.query.ssid) {
if (nobanself) {
if (result == wtva.REASON_SELF) {
data += "<strong>Cannot ban yourself.</strong>"
} else {
if (entry_exists) {
if (result == wtva.REASON_EXISTS) {
data += "<strong>SSID " + request_headers.query.ssid + " is already in the ban list.</strong><br><br>";
} else {
} else if (result === wtva.SUCCESS) {
reloadConfig();
data += "<strong>SSID " + request_headers.query.ssid + " added to the ban list.</strong><br><br>";
} else {
data += "<strong>Unexpected response "+result.toString()+".</strong><br><br>";
}
}
}