let DC and MSTV Sim through the SSID check for now.

This commit is contained in:
zefie
2024-05-04 18:49:00 -04:00
parent 23808c51b6
commit 543fa08b2a
2 changed files with 10 additions and 8 deletions

View File

@@ -1471,9 +1471,11 @@ async function processRequest(socket, data_hex, skipSecure = false, encryptedReq
if (!headers) return; if (!headers) return;
if (headers["wtv-client-serial-number"] != null && socket.ssid == null) { if (headers["wtv-client-serial-number"] != null && socket.ssid == null) {
socket.ssid = wtvshared.makeSafeSSID(headers["wtv-client-serial-number"]);
if (minisrv_config.config.require_valid_ssid) { if (minisrv_config.config.require_valid_ssid) {
if (!wtvshared.checkSSID(headers["wtv-client-serial-number"])) { if (!wtvshared.checkSSID(headers["wtv-client-serial-number"])) {
// reject invalid SSIDs if (socket.ssid.substring(0, 5) != "1SEGA" && socket.ssid.substring(0, 8) != "MSTVSIMU") {
// reject invalid SSIDs, but let Dreamcast and MSTV Sim through for now until we figure out their checksumming method.
var errpage = wtvshared.doErrorPage(400, "minisrv ran into a technical problem. Reason: Your SSID is not valid."); var errpage = wtvshared.doErrorPage(400, "minisrv ran into a technical problem. Reason: Your SSID is not valid.");
headers = errpage[0]; headers = errpage[0];
data = errpage[1]; data = errpage[1];
@@ -1481,7 +1483,7 @@ async function processRequest(socket, data_hex, skipSecure = false, encryptedReq
return; return;
} }
} }
socket.ssid = wtvshared.makeSafeSSID(headers["wtv-client-serial-number"]); }
if (socket.ssid != null) { if (socket.ssid != null) {
if (!ssid_sessions[socket.ssid]) { if (!ssid_sessions[socket.ssid]) {
ssid_sessions[socket.ssid] = new WTVClientSessionData(minisrv_config, socket.ssid); ssid_sessions[socket.ssid] = new WTVClientSessionData(minisrv_config, socket.ssid);

View File

@@ -362,7 +362,7 @@
}, },
{ {
"title": "RetroSite", "title": "RetroSite",
"url": "http://retrosite.ga/", "url": "http://retrosite.org/",
"image_type": "url", "image_type": "url",
"image": "canned/retrosite.gif" "image": "canned/retrosite.gif"
}, },