some more msntv2 updates

This commit is contained in:
zefie
2026-05-05 09:20:31 -04:00
parent e1d2c59ed5
commit 43a87347b8
8 changed files with 51 additions and 31 deletions

View File

@@ -1,6 +1,9 @@
const minisrv_service_file = true;
// TODO: if the user hits back, and removes the password from the user/pass page, any previously entered password
// will still be in the cookie and they will skip the password page.
// We should probably clear the password cookie when they hit back from the password page, but how?
// We can't assume password = '' means they hit back, because some pages will not send it.
let email = request_headers.query.email || '';
if (Array.isArray(email)) email = email[0];
if (!email && request_headers.cookie) {
@@ -31,14 +34,16 @@ data = "";
}
}
if (!password) {
if (!password && !headers) {
headers = `Status: 302 Found
Location: https://sg1.trusted.msntv.msn.com/Register/Password-Required.aspx`;
data = "";
deleteCookie('register_password', { path: '/' });
} else {
setCookie('register_password', password, { path: '/' });
}
if (userAvail && password) {
if (password) setCookie('register_password', password, { path: '/' });
headers = `Status: 200 OK
Content-type: text/html`;
@@ -75,7 +80,7 @@ data = `<HTML xmlns:msntv>
<tr style="margin: 0; padding: 0; top: 2px; position: relative;">
<td style="margin: 0; padding: 0; vertical-align: middle; top: 2px; position: relative;"><img src="msntv:/Shared/Images/BulletCustom.gif" height="14" width="7" alt="Bullet"></td>
<td style="margin: 0; padding: 0; width: 4px;"></td>
<td style="margin: 0; padding: 0; font-size: 24px; font:bold 18; line-height: 20px;"><a class="shrLnk2" href="/Register/Enter-Promotion-Code.aspx" style="display: inline-block; line-height: 20px;">Yes, I have a Promotion Code.</a></td>
<td style="margin: 0; padding: 0; font-size: 24px; font:bold 18; line-height: 20px;"><a class="shrLnk2" href="/Register/Enter-Promotion-Code.aspx" style="display: inline-block; line-height: 20px;">Yes, I have a Promotion Code.</a> (TODO)</td>
</tr>
</table>
</div>