diff --git a/zefie_wtvp_minisrv/app.js b/zefie_wtvp_minisrv/app.js index 37998784..125ea4ae 100644 --- a/zefie_wtvp_minisrv/app.js +++ b/zefie_wtvp_minisrv/app.js @@ -587,6 +587,10 @@ async function processPath(socket, service_vault_file_path, request_headers = [] updateFromVM.push(["socket_sessions", "socket_sessions"]); // global socket_sessions object for privileged service scripts, such as wtv-1800, etc } + if (request_headers['User-Agent'] === "Artemis/0.0") { + socket_sessions[socket.id].prealpha = true; + } + try { vaults_to_scan.forEach(function (service_vault_dir) { if (service_vault_found) return; @@ -1631,7 +1635,7 @@ async function sendToClient(socket, headers_obj, data = null) { if (!socket.res) { // encrypt if needed - if (socket_sessions[socket.id].secure === true && !socket_sessions[socket.id].do_not_encrypt) { + if (socket_sessions[socket.id].secure === true && !socket_sessions[socket.id].do_not_encrypt && !socket_sessions[socket.id].prealpha) { headers_obj["wtv-encrypted"] = 'true'; headers_obj = wtvshared.moveObjectKey('wtv-encrypted', 'Connection', headers_obj); if (content_length > 0 && socket_sessions[socket.id].wtvsec) { @@ -1646,6 +1650,9 @@ async function sendToClient(socket, headers_obj, data = null) { } } + if (socket_sessions[socket.id].prealpha === true && !socket_sessions[socket.id].secure) { + if (headers_obj["wtv-encrypted"]) delete headers_obj["wtv-encrypted"]; + } // calculate content length // make sure we are using our Content-length and not one set in a script. diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-head-waiter/ValidateLogin.js b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-head-waiter/ValidateLogin.js index 8272c7be..ba205944 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-head-waiter/ValidateLogin.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-head-waiter/ValidateLogin.js @@ -69,15 +69,19 @@ wtv-visit: client:hangupphone` } else { console.log(" * wtv-challenge-response FAILED for " + wtvshared.filterSSID(socket.ssid)); if (minisrv_config.config.debug_flags.debug) console.log("Response Expected:", challenge_response.toString(CryptoJS.enc.Base64)); - if (minisrv_config.config.debug_flags.debug) console.log("Response Received:", client_challenge_response) + if (minisrv_config.config.debug_flags.debug) console.log("Response Received:", client_challenge_response); errpage = wtvshared.doErrorPage(500, "Invalid challenge response received"); headers = errpage[0]; data = errpage[1]; } } else { - errpage = wtvshared.doErrorPage(500, "No challenge response received"); - headers = errpage[0]; - data = errpage[1]; + if (!socket_sessions[socket.id].prealpha) { + errpage = wtvshared.doErrorPage(500, "No challenge response received"); + headers = errpage[0]; + data = errpage[1]; + } else { + gourl = "wtv-head-waiter:/login-stage-two?"; + } } } else { gourl = "wtv-head-waiter:/login-stage-two?"; @@ -110,10 +114,9 @@ minisrv-no-mail-count: true`; limitedLoginRegistered = (limitedLogin && session_data.isRegistered()); } headers = `200 OK -wtv-connection-close: true -Connection: close minisrv-no-mail-count: true Content-Type: text/html`; + if (client_challenge_response) { headers += ` wtv-encrypted: ${(request_headers['wtv-encrypted']) ? wtvshared.parseBool(request_headers['wtv-encrypted']) : true}`; diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateAgreement.js b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateAgreement.js index ee79f810..567433ca 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateAgreement.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateAgreement.js @@ -40,11 +40,11 @@ AutoCaps selected value="${request_headers.query.subscriber_contact || ""}"> CONTACT INFO TYPE: `; const form_data = ` diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateReviewAccountInfo.js b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateReviewAccountInfo.js index 1027a643..4ead2a77 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateReviewAccountInfo.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-register/ValidateReviewAccountInfo.js @@ -59,76 +59,74 @@ if (!request_headers.query.registering || } else { headers = `200 OK - Content-Type: text/html`; +Content-Type: text/html`; data = ` - - - Finished signing up - - - - - - - - - -
- - - -
- - - - - - You've finished signing up - -
- -
- - - - - - - -
-
-
- Thank you for signing up for ${minisrv_config.config.service_name}. -

- You will now go - to your Web Home page. You can always - connect to the Internet by choosing - Web Home on your TV Home page. - -

-
- -
-
- - - - - - - - - -
- - + + +Finished signing up + + + + + + + + + +
+ + + +
+ + + + + +You've finished signing up + +
+ +
+ + + + + + + +
+
+
+Thank you for signing up for ${minisrv_config.config.service_name}. +

+You will now go +to your Web Home page. You can always +connect to the Internet by choosing +Web Home on your TV Home page. + +

+
+ +
+
+ + + + + + + + + +
+ + `; } } diff --git a/zefie_wtvp_minisrv/includes/classes/WTVClientCapabilities.js b/zefie_wtvp_minisrv/includes/classes/WTVClientCapabilities.js index 9b9626e5..f53c8dc9 100644 --- a/zefie_wtvp_minisrv/includes/classes/WTVClientCapabilities.js +++ b/zefie_wtvp_minisrv/includes/classes/WTVClientCapabilities.js @@ -135,7 +135,7 @@ class WTVClientCapabilities { } get(key = null) { - if (typeof (this.capabilities) === 'undefined') return null; + if (typeof (this.capabilities) === 'undefined' || !this.capabilities) return null; else if (key === null) return this.capabilities; else if (this.capabilities[key]) return this.capabilities[key]; else return null;