some fixes for pages that broke from the new VM based eval

This commit is contained in:
zefie
2022-09-26 16:46:27 -04:00
parent b2aece5437
commit e538bfb913
7 changed files with 8 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
var minisrv_service_file = true; var minisrv_service_file = true;
var errpage;
if (ssid_sessions[socket.ssid].user_id != 0) errpage = wtvshared.doErrorPage(400, "You are not authorized to add users to this account."); if (ssid_sessions[socket.ssid].user_id != 0) errpage = wtvshared.doErrorPage(400, "You are not authorized to add users to this account.");

View File

@@ -1,4 +1,5 @@
var minisrv_service_file = true; var minisrv_service_file = true;
var errpage;
if (Object.keys(ssid_sessions[socket.ssid].listPrimaryAccountUsers()).length >= minisrv_config.config.user_accounts.max_users_per_account) { if (Object.keys(ssid_sessions[socket.ssid].listPrimaryAccountUsers()).length >= minisrv_config.config.user_accounts.max_users_per_account) {
errpage = wtvshared.doErrorPage(400, "You are not authorized to add more than " + minisrv_config.config.user_accounts.max_users_per_account + ` account${minisrv_config.config.user_accounts.max_users_per_account > 1 ? 's' : ''}.`); errpage = wtvshared.doErrorPage(400, "You are not authorized to add more than " + minisrv_config.config.user_accounts.max_users_per_account + ` account${minisrv_config.config.user_accounts.max_users_per_account > 1 ? 's' : ''}.`);

View File

@@ -1,4 +1,5 @@
var minisrv_service_file = true; var minisrv_service_file = true;
var errpage;
if (Object.keys(ssid_sessions[socket.ssid].listPrimaryAccountUsers()).length == 1) { if (Object.keys(ssid_sessions[socket.ssid].listPrimaryAccountUsers()).length == 1) {
errpage = wtvshared.doErrorPage(400, "There are no more users to remove."); errpage = wtvshared.doErrorPage(400, "There are no more users to remove.");

View File

@@ -115,7 +115,7 @@ display_name=${request_headers.query.display_name}&
user_name=${request_headers.query.user_name}& user_name=${request_headers.query.user_name}&
user_password=${request_headers.query.user_password}& user_password=${request_headers.query.user_password}&
user_password2=${request_headers.query.user_password2}& user_password2=${request_headers.query.user_password2}&
review-only='TRUE'"> review-only=true">
${request_headers.query.display_name || request_headers.query.user_name} ${request_headers.query.display_name || request_headers.query.user_name}
</a> </a>
<tr> <tr>

View File

@@ -1,4 +1,5 @@
var minisrv_service_file = true; var minisrv_service_file = true;
var errpage;
if (Object.keys(ssid_sessions[socket.ssid].listPrimaryAccountUsers()).length == 1) { if (Object.keys(ssid_sessions[socket.ssid].listPrimaryAccountUsers()).length == 1) {
errpage = wtvshared.doErrorPage(400, "There are no more users to remove."); errpage = wtvshared.doErrorPage(400, "There are no more users to remove.");

View File

@@ -120,6 +120,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
https: https, https: https,
wtvshared: wtvshared, wtvshared: wtvshared,
clientShowAlert: clientShowAlert, clientShowAlert: clientShowAlert,
WTVClientSessionData: WTVClientSessionData,
strftime: strftime, strftime: strftime,
CryptoJS: CryptoJS, CryptoJS: CryptoJS,
fs: fs, fs: fs,
@@ -128,6 +129,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
getServiceString: getServiceString, getServiceString: getServiceString,
sendToClient: sendToClient, sendToClient: sendToClient,
socket: socket, socket: socket,
SessionStore: SessionStore,
request_headers: request_headers, request_headers: request_headers,
service_name: service_name, service_name: service_name,
service_vaults: service_vaults, service_vaults: service_vaults,

View File

@@ -1,6 +1,6 @@
{ {
"name": "zefie_wtvp_minisrv", "name": "zefie_wtvp_minisrv",
"version": "0.9.26", "version": "0.9.30",
"description": "WebTV Service (WTVP) Emulation Server", "description": "WebTV Service (WTVP) Emulation Server",
"main": "app.js", "main": "app.js",
"homepage": "https://github.com/zefie/zefie_wtvp_minisrv", "homepage": "https://github.com/zefie/zefie_wtvp_minisrv",