- numerous bug fixes
 - wtv-news goodies, ready for local testing
   - custom patched nntp-server node module with support for POSTing
   - should be able to post locally
   - 4 groups are made by default
   - can override in user_config.json (look at the config.json changes but dont do them there)
   - can sync down from an upstream server with sync_nntp.js
   - sync does not push new posts to upstream yet
This commit is contained in:
zefie
2022-10-11 21:44:18 -04:00
parent 1165b245ce
commit b89e0e932c
181 changed files with 4333 additions and 688 deletions

View File

@@ -98,6 +98,8 @@ Display name<br>
bgcolor=#444444 text=#ffdd33 cursor=#cc9933
TYPE="text" ASCIIONLY
SIZE="18"
selected
autoactivate
MAXLENGTH="18">
</a>
</table>

View File

@@ -123,7 +123,7 @@ MAXLENGTH="${minisrv_config.config.passwords.max_length}">
<tr>
<td colspan=3 align=left>
<br>Type again to confirm<br>
<INPUT noSubmit name="verify" id="verify" Value=""
<INPUT noSubmit name="password_verify" id="password_verify" Value=""
bgcolor=#444444 text=#ffdd33 cursor=#cc9933
TYPE="password" ASCIIONLY
SIZE="${minisrv_config.config.passwords.form_size}"

View File

@@ -2,10 +2,24 @@ var minisrv_service_file = true;
headers = `200 OK
Connection: Keep-Alive
wtv-expire-all: wtv-
wtv-noback-all: wtv-setup:/mail-signature
wtv-expire-all: wtv-setup:/mail-signature
wtv-expire-all: wtv-mail:/get-signature
wtv-expire-all: wtv-mail:/sendmail
wtv-expire-all: http
Content-Type: text/html`
var signature = session_data.getSessionData("subscriber_signature");
if (request_headers.query.mail_signature) {
if (signature != request_headers.query.mail_signature) {
session_data.setSessionData("subscriber_signature", (request_headers.query.mail_signature) ? request_headers.query.mail_signature : "");
session_data.saveSessionData();
signature = request_headers.query.mail_signature;
}
}
var message_colors = session_data.mailstore.getSignatureColors(signature)
data = `<HTML>
<HEAD>
<TITLE>
@@ -67,13 +81,16 @@ Mail signature
<td abswidth=20>
<TR>
<td>
<td colspan=3 WIDTH=416 HEIGHT=98 VALIGN=top ALIGN=left>
<td colspan=3 WIDTH=416 HEIGHT=68 VALIGN=top ALIGN=left>
<spacer type=block height=24 width=1>
Type a short text <B>signature</B> here and it will be added to the end of each mail message you send.
Type a short text <B>signature</B> here and it will be added to the end of each mail message you send.<br>
If you wish to use HTML, the first line of your signature should be <b>&lt;html&gt;</b>.
<TR>
<TD absheight=6>
<TR>
<TD>
<TD colspan=3 WIDTH=416 HEIGHT=118 VALIGN=top ALIGN=left>
<FORM method="POST" action="/validate-mail-signature">
<FORM method="POST" name="sig" action="/validate-mail-signature">
<INPUT type=hidden autosubmit=onleave>
<TEXTAREA name="mail_signature"
action="/validate-mail-signature"
@@ -84,7 +101,7 @@ cols=45 rows=5
autoactivate
nosoftbreaks
maxlength=4096
font=proportional>${session_data.getSessionData("subscriber_signature") || ""}</TEXTAREA></FORM></TD>
font=proportional>${signature || ""}</TEXTAREA></FORM></TD>
</FORM>
<TR>
<TD>
@@ -96,16 +113,26 @@ font=proportional>${session_data.getSessionData("subscriber_signature") || ""}</
<tr>
<TD>
<td colspan=4 height=1 valign=top align=left>
${(request_headers.query.preview) ? "<tr><td><td colspan=3><b>Signature Preview:</b>" : ""}
<tr>
<TD>
<td colspan=3 height=2 valign=top align=left bgcolor="0D0D0D">
<img src="wtv-home:/ROMCache/Spacer.gif" width=436 height=1>
<td colspan=3 valign=top align=left bgcolor="${(request_headers.query.preview) ? message_colors.bgcolor : "0D0D0D"}">
${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&demotext=${encodeURIComponent(`<hr>This is a preview of your signature. The text below the line will not appear in your outgoing messages. It is provided to demonstrate what a message composed with this signature may look like. <a href="client:donothing">This is what a link looks like</a>.`)}" height=40></embed><br><br>` : ''}
<tr>
<td>
<td colspan=3 height=2 valign=top align=left>
<img src="wtv-home:/ROMCache/Spacer.gif" width=436 height=6>
<TR>
<TD>
<TD COLSPAN=4 HEIGHT=4 VALIGN=top ALIGN=left>
<TR>
<TD VALIGN=top ALIGN=left>
<FORM action="/mail-signature" METHOD="POST" onsubmit="this.mail_signature.value = document.forms[0].mail_signature.value">
<INPUT type=hidden name="mail_signature">
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" Value=Preview NAME="preview" USESTYLE WIDTH=103>
</SHADOW></FONT></FORM>
<TD>
<TD COLSPAN=3 VALIGN=top ALIGN=right>
<TD VALIGN=top ALIGN=right>
<FORM action="client:goback">
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" Value=Done NAME="Done" USESTYLE WIDTH=103>

View File

@@ -128,7 +128,9 @@ data += `
<spacer type=block width=1 height=5><BR>
<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
<a href="wtv-setup:/phone">Dialing</a><BR>
<spacer type=block width=1 height=5><BR>
<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
<a href="wtv-setup:/tweaks">Tweaks</a><BR>
<TD WIDTH=20>
<TD WIDTH=300 VALIGN=top ALIGN=left>
<spacer type=block width=6 height=14><font size="2"><br>
@@ -157,7 +159,8 @@ Configure Messenger<BR>`;
data += `<spacer type=block width=6 height=6><font size="2"><br>
Connecting to WebTV<BR>
<spacer type=block width=6 height=6><font size="2"><br>
minisrv specific settings<BR>
<tr>
<td colspan=4 height=2>

View File

@@ -0,0 +1,124 @@
var minisrv_service_file = true;
headers = `200 OK
Connection: Keep-Alive
wtv-expire-all: wtv-setup:/tweaks
Content-Type: text/html`
data = `<!--- *=* Copyright 1996, 1997 WebTV Networks, Inc. All rights reserved. --->
<HTML>
<HEAD>
<TITLE>
Tweaks and extra configuration
</TITLE>
<DISPLAY noscroll nologo>
</HEAD>
<sidebar width=110> <table cellspacing=0 cellpadding=0 BGCOLOR=452a36>
<tr>
<td colspan=3 abswidth=104 absheight=4>
<td rowspan=99 width=6 absheight=420 valign=top align=left>
<img src="file://ROM/Cache/Shadow.gif" width=6 height=420>
<tr>
<td abswidth=6>
<td abswidth=92 absheight=76>
<table href="wtv-home:/home" absheight=76 cellspacing=0 cellpadding=0>
<tr>
<td align=right>
<img src="${minisrv_config.config.service_logo}" width=87 height=67>
</table>
<td abswidth=6>
<tr><td absheight=5 colspan=3>
<table cellspacing=0 cellpadding=0>
<tr><td abswidth=104 absheight=2 valign=middle align=center bgcolor=2e1e26>
<spacer>
<tr><td abswidth=104 absheight=1 valign=top align=left>
<tr><td abswidth=104 absheight=2 valign=top align=left bgcolor=6b4657>
<spacer>
</table>
<tr><td absheight=132>
<tr><td absheight=166 align=right colspan=3>
<img src="ROMCache/SettingsBanner.gif" width=54 height=166>
<tr><td absheight=41>
</table>
</sidebar>
<BODY BGCOLOR="#191919" TEXT="#42CC55" LINK="189CD6" VLINK="189CD6" HSPACE=0 VSPACE=0 FONTSIZE="large"
>
<table cellspacing=0 cellpadding=0>
<tr>
<td abswidth=14>
<td colspan=3>
<table cellspacing=0 cellpadding=0>
<tr>
<td valign=center absheight=80>
<font size="+2" color="E7CE4A"><blackface><shadow>
Tweaks and extra config
</table>
<td abswidth=20>
<tr>
<TD>
<td colspan=3 height=2 abswidth=300 valign=middle align=center bgcolor="2B2B2B">
<spacer type=block width=436 height=1>
<tr>
<TD>
<td colspan=3 height=1 valign=top align=left>
<tr>
<TD>
<td colspan=3 height=2 valign=top align=left bgcolor="0D0D0D">
<spacer type=block width=436 height=1>
<td abswidth=20>
<tr><td colspan=4 height=10></td></tr>
<TR>
<td>
<td WIDTH=198 HEIGHT=236 VALIGN=top ALIGN=left>
<table cellspacing=0 cellpadding=0>
<tr><td absheight=110 valign=top>
<font size=-1>Speeds up the splash logo page
by not waiting for the splash music to finish.
</table>
<TD WIDTH=20>
<TD WIDTH=198 VALIGN=top ALIGN=left>
<form action="wtv-setup:/validate-tweaks">
<input type=hidden name=autosubmit value=true autosubmit=onleave>
<table cellspacing=0 cellpadding=0>
<tr><td absheight=70 valign=top>
<table>
<tr>
<td valign=top>
<input type=checkbox name=fast_splash ${(wtvshared.parseBool(session_data.getSessionData("fast_splash"))) ? "checked=checked" : ''}>
<td valign=top>
FastSplash&trade;
</table>
</table>
</form>
<TR>
<TD>
<TD COLSPAN=4 HEIGHT=0 VALIGN=top ALIGN=left>
<tr>
<TD>
<td colspan=3 height=2 valign=middle align=center bgcolor="2B2B2B">
<spacer type=block width=436 height=1>
<tr>
<TD>
<td colspan=4 height=1 valign=top align=left>
<tr>
<TD>
<td colspan=3 height=2 valign=top align=left bgcolor="0D0D0D">
<spacer type=block width=436 height=1>
<TR>
<TD>
<TD COLSPAN=4 HEIGHT=4 VALIGN=top ALIGN=left>
<TR>
<TD>
<TD COLSPAN=2 VALIGN=top ALIGN=left>
<TD VALIGN=top ALIGN=right>
<FORM action="client:goback">
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
<INPUT TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" Value=Done NAME="Done" USESTYLE WIDTH=103>
</SHADOW></FONT></FORM>
<TD>
</TABLE>
</BODY>
</HTML>
`;

View File

@@ -36,7 +36,7 @@ Content-Type: text/html`
data = errpage[1];
}
else {
if (request_headers.query.password.length == 0 && request_headers.query.verify.length == 0) {
if (request_headers.query.password.length == 0 && request_headers.query.password_verify.length == 0) {
userSession.disableUserPassword();
headers = `300 OK
Content-type: text/html
@@ -50,7 +50,7 @@ Location: ${request_headers.query.return_to}`;
}
else if (request_headers.query.password.length < minisrv_config.config.passwords.min_length) errpage = wtvshared.doErrorPage(400, "Your password must contain at least " + minisrv_config.config.passwords.min_length + " characters.");
else if (request_headers.query.password.length > minisrv_config.config.passwords.max_length) errpage = wtvshared.doErrorPage(400, "Your password must contain no more than than " + minisrv_config.config.passwords.max_length + " characters.");
else if (request_headers.query.password !== request_headers.query.verify) errpage = wtvshared.doErrorPage(400, "The passwords you entered did not match. Please check them and try again.");
else if (request_headers.query.password !== request_headers.query.password_verify) errpage = wtvshared.doErrorPage(400, "The passwords you entered did not match. Please check them and try again.");
else {
if (errpage) {
headers = errpage[0];

View File

@@ -1,8 +1,11 @@
var minisrv_service_file = true;
if (request_headers.query && session_data) {
session_data.setSessionData("subscriber_signature", (request_headers.query.mail_signature) ? request_headers.query.mail_signature : "");
session_data.saveSessionData();
var signature = session_data.getSessionData("subscriber_signature");
if (request_headers.query.mail_signature != signature) {
session_data.setSessionData("subscriber_signature", (request_headers.query.mail_signature) ? request_headers.query.mail_signature : "");
session_data.saveSessionData();
}
headers = `200 OK
Content-type: text/html`
} else {

View File

@@ -54,7 +54,6 @@ Connection: Keep-Alive
Content-Type: text/html
wtv-expire-all: wtv-setup:/remove-users
wtv-expire-all: wtv-setup:/accounts
wtv-visit: ${confirmAlert}
Location: ${confirmAlert}`
} else {
Object.keys(usersToRemove).forEach(function (k) {
@@ -69,7 +68,6 @@ Connection: Keep-Alive
Content-Type: text/html
wtv-expire-all: wtv-setup:/remove-users
wtv-expire-all: wtv-setup:/accounts
wtv-visit: ${gourl}
Location: ${gourl}`
}
}

View File

@@ -0,0 +1,12 @@
var minisrv_service_file = true;
var fast_splash = wtvshared.parseBool(request_headers.query.fast_splash);
session_data.setSessionData("fast_splash", fast_splash);
session_data.saveSessionData();
headers = `200 OK
Connection: Keep-Alive
wtv-expire-all: wtv-
wtv-expire-all: http
Content-Type: text/html`