some more msntv2 updates
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
const WTVClientSessionData = require("../../../classes/WTVClientSessionData");
|
||||
|
||||
const minisrv_service_file = true;
|
||||
|
||||
if (!session_data) {
|
||||
|
||||
@@ -53,6 +53,8 @@ data = `<HTML xmlns:msntv>
|
||||
</p>
|
||||
<p style="display: inline; left: 76px; position: relative;">Example:</p>
|
||||
<p style="display: inline; left: 110px; position: relative;">ABCEAZ82KDKA</p>
|
||||
<p> </p>
|
||||
<p>One day, certain promotion codes will unlock special features or content on minisrv. But for now, this is just a placeholder page.</p>
|
||||
</DIV>
|
||||
<div id="footer">
|
||||
<msntv:CustomButton id="continue" label="Continue" href="javascript:SubmitForm()" />
|
||||
|
||||
@@ -86,7 +86,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:bold 18; line-height: 20px;"><a class="shrLnk2" href="https://headwaiter.trusted.msntv.msn.com/connection/boxcheck.html" style="display: inline-block; line-height: 20px;">I want to start over</a></td>
|
||||
<td style="margin: 0; padding: 0; font:bold 18; line-height: 20px;"><a class="shrLnk2" href="msntv:/Registration/pages/Welcome.html" style="display: inline-block; line-height: 20px;">I want to start over</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ headers = `Status: 200 OK
|
||||
Content-type: text/html`;
|
||||
|
||||
data = `<HTML xmlns:msntv>
|
||||
<?import namespace="msntv" implementation="HTC/Shared/CustomButton.htc">
|
||||
<?import namespace="msntv" implementation="https://sg1.trusted.msntv.msn.com/Include/HTC/Shared/CustomButton.htc">
|
||||
<HEAD>
|
||||
<title id="title">Learning to use the keyboard</title>
|
||||
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
|
||||
@@ -44,16 +44,12 @@ data = `<HTML xmlns:msntv>
|
||||
<textarea name="password" id="password" rows="1" cols="15"></textarea>
|
||||
</div>
|
||||
<br>
|
||||
If you don't have an existing minisrv account, select the <EM>Back</EM> Button.
|
||||
If you reset your box, you can recover your existing account by entering the username and password.
|
||||
If you intend to use an account that is already established on your WebTV, type in the username and password for that account.
|
||||
If you do not have a password set on your primary user account, you will need to set one up on your WebTV before you can log in here. After entering your username and password, select the <EM>Continue</EM> Button.
|
||||
If you do not have a password set on your primary user account, you will need to set one up on your WebTV before you can connect it to this MSNTV2.
|
||||
After entering your username and password, select the <EM>Continue</EM> Button.
|
||||
</DIV>
|
||||
<div id="footer">
|
||||
<msntv:CustomButton id="continue" label="Continue" href="/Register/Validate-account.aspx"/>
|
||||
</div>
|
||||
<div id="Back">
|
||||
<msntv:CustomButton id="continue2" label="Back" href="/Register/Register-MSN-email.aspx"/>
|
||||
<msntv:CustomButton id="continue2" label="Back" href="/Register/Establish-your-MSN-TV-Account.html"/>
|
||||
<msntv:CustomButton id="continue" label="Continue" disabled="true" href="/Register/Validate-account.aspx"/>
|
||||
</div>
|
||||
</BODY>
|
||||
</HTML>`;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -6,7 +6,7 @@ Content-type: text/html`;
|
||||
data = `<HTML xmlns:msntv>
|
||||
<?import namespace="msntv" implementation="/Include/HTC/Shared/CustomButton.htc">
|
||||
<HEAD>
|
||||
<title id="title">Login to Passport</title>
|
||||
<title id="title">Username Not Available</title>
|
||||
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<link rel="stylesheet" type="text/css" href="msntv:/Registration/css/Registration.css">
|
||||
<STYLE>
|
||||
|
||||
@@ -285,21 +285,34 @@ switch (phase) {
|
||||
}
|
||||
}
|
||||
|
||||
var hasIDCRL = false;
|
||||
|
||||
try {
|
||||
hasIDCRL = (typeof TVShell.LoginManager.IDCRLInitialize === "unknown" ||
|
||||
typeof TVShell.LoginManager.IDCRLInitialize === "function");
|
||||
} catch (e) {
|
||||
hasIDCRL = false;
|
||||
}
|
||||
|
||||
if (currentUser != null) {
|
||||
// Check if We can do IDCRL if not fall back to Legacy XMLlogin
|
||||
if (TVShell.LoginManager.IDCRLInitialize) {
|
||||
DoIDCRLLogin();
|
||||
} else {
|
||||
// Non IDCRL Auth Code (Pre 5.x)
|
||||
Sink.AttachEvent(TVShell.LoginManager, 'OnLoginResult', OnLoginResult);
|
||||
TVShell.LoginManager.PassportSiteIDs = '507';
|
||||
TVShell.LoginManager.LoginURL = "https://login.live.com/ppsecure/clientpost.srf";
|
||||
TVShell.LoginManager.LogoutURL = "https://login.live.com/ppsecure/logoutxml.srf";
|
||||
TVShell.LoginManager.ResetPasswordURL = "https://login.live.com/ppsecure/MSRV_ResetPW_ClientPost.srf";
|
||||
TVShell.LoginManager.ChangePasswordURL = "https://login.live.com/ppsecure/MSRV_ChangePW_ClientPost.srf";
|
||||
TVShell.LoginManager.RequestProfileURL = "https://login.live.com/ppsecure/ClientProfileRequest.srf";
|
||||
TVShell.LoginManager.UpdateProfileURL = "https://login.live.com/ClientEditProf.srf";
|
||||
TVShell.LoginManager.Authenticate(email, "", "https://login.live.com/ppsecure/clientpost.srf");
|
||||
try {
|
||||
if (hasIDCRL) {
|
||||
DoIDCRLLogin();
|
||||
} else {
|
||||
// Non IDCRL Auth Code (Pre 5.x)
|
||||
Sink.AttachEvent(TVShell.LoginManager, 'OnLoginResult', OnLoginResult);
|
||||
TVShell.LoginManager.PassportSiteIDs = '507';
|
||||
TVShell.LoginManager.LoginURL = "https://login.live.com/ppsecure/clientpost.srf";
|
||||
TVShell.LoginManager.LogoutURL = "https://login.live.com/ppsecure/logoutxml.srf";
|
||||
TVShell.LoginManager.ResetPasswordURL = "https://login.live.com/ppsecure/MSRV_ResetPW_ClientPost.srf";
|
||||
TVShell.LoginManager.ChangePasswordURL = "https://login.live.com/ppsecure/MSRV_ChangePW_ClientPost.srf";
|
||||
TVShell.LoginManager.RequestProfileURL = "https://login.live.com/ppsecure/ClientProfileRequest.srf";
|
||||
TVShell.LoginManager.UpdateProfileURL = "https://login.live.com/ClientEditProf.srf";
|
||||
TVShell.LoginManager.Authenticate(email, "", "https://login.live.com/ppsecure/clientpost.srf");
|
||||
}
|
||||
} catch (e) {
|
||||
TVShell.EventLog.Important("Login error: " + e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,13 @@ class WTVMSNTV2 {
|
||||
socket.rawDataListener = (chunk) => this.handleData(socket, chunk);
|
||||
socket.on('data', socket.rawDataListener);
|
||||
socket.on('error', (err) => {
|
||||
if (this.service_config.debug) console.error('[WTV-MSNTV2] socket error:', err.message);
|
||||
if (this.service_config.debug) {
|
||||
if (err.message == 'read ECONNRESET') {
|
||||
console.warn('[WTV-MSNTV2] Client disconnected');
|
||||
} else {
|
||||
console.error('[WTV-MSNTV2] socket error:', err.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user