From fd67132da9235db430be3f7ad5fddbc849200189 Mon Sep 17 00:00:00 2001 From: zefie Date: Tue, 5 May 2026 14:35:37 -0400 Subject: [PATCH] store the msntv2 token so we can look it up later --- .../ServiceVault/msntv2/passport/RST.srf.js | 2 + .../msntv2/sg1/Pages/Discuss/FileSound.gif | Bin 0 -> 1520 bytes .../msntv2/sg1/Pages/Discuss/ListLeftEdge.gif | Bin 0 -> 90 bytes .../msntv2/sg1/Pages/Discuss/ListNext.gif | Bin 0 -> 300 bytes .../msntv2/sg1/Pages/Discuss/ListNext_D.gif | Bin 0 -> 300 bytes .../msntv2/sg1/Pages/Discuss/ListPrevious.gif | Bin 0 -> 292 bytes .../sg1/Pages/Discuss/ListPrevious_D.gif | Bin 0 -> 292 bytes .../sg1/Pages/Discuss/ListRightEdge.gif | Bin 0 -> 91 bytes .../msntv2/sg1/Pages/Discuss/News.aspx.js | 502 ++++++++++++++++++ .../msntv2/sg1/Pages/Discuss/home.aspx.js | 72 +++ .../includes/classes/WTV-MSNTV2.js | 1 + .../includes/classes/WTVShared.js | 74 +++ zefie_wtvp_minisrv/includes/config.json | 6 +- 13 files changed, 655 insertions(+), 2 deletions(-) create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/FileSound.gif create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListLeftEdge.gif create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListNext.gif create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListNext_D.gif create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListPrevious.gif create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListPrevious_D.gif create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListRightEdge.gif create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/News.aspx.js create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/home.aspx.js diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/passport/RST.srf.js b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/passport/RST.srf.js index 050442b0..9febec9c 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/passport/RST.srf.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/passport/RST.srf.js @@ -208,6 +208,7 @@ function generateSuccessResponse(requestBody, userId, email, firstName, lastName const needsProofToken = policy === "MBI_KEY_OLD"; const token = generateRandomToken(userId, appliesTo, isLegacy); + wtvshared.storeToken(token, socket.ssid, userId, expiresTime); const tokenId = isLegacy ? `BinaryDAToken${rstIndex}` : `Compact${rstIndex}`; const binarySecret = crypto.randomBytes(32).toString('base64'); @@ -270,6 +271,7 @@ function generateSuccessResponse(requestBody, userId, email, firstName, lastName if (!foundRst) { const defaultToken = generateRandomToken(userId, "urn:passport:compact", false); + wtvshared.storeToken(defaultToken, socket.ssid, userId, expiresTime); responses.push(` urn:passport:compact diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/FileSound.gif b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/FileSound.gif new file mode 100644 index 0000000000000000000000000000000000000000..199fcd98a9fab354d946d6f60766df7108409710 GIT binary patch literal 1520 zcmVrjG#R_Qj{k?6B8H<5*ivE zA~Q>D4;CRIGedAEMY&gRVH7EHhMB}hTofKG2@MpKo1jc9EE+$G(P}k1I-kW=WTxW;BoYXUP%059 zB?U?3M2{%0}TxztE(WduNeXd4r?7LLn|KyKRPA;bU;2UJ}Wf_a4uFoGzd1Tew~BoIIXQnz#< zVGa{!09#vcy%2y@JpSom04)u0)yWYAsKCPsD5j_)iaE^U06-`3HNGDX^f91$`~U3=GfAatA{u z*k(jGI_$7Q4<7Jy7hZa`!=+yuNI(w<3v7eW3e)Uhp$8A>U=BKQ!cg7=S!Bb(1$ve? zLI{ZAnF9t#+N8myJz($x4lOMzV`)#kV8W1*5{ZMEpc+Kg6jV&a1|+G%F#-*r^&^^S zIGE66tRI|Kg%uDXil_v_*3hX_sNR;44hyKJffguaAj7o8%_4yZEe*6B9175&P#u)X z@Y_fmw9tYX{^DS}28ssd;H?fWT#La5(*ai>bO3_jIh=r> z&fUEo)l@Xx;J`dFbVa}i5L6J+2nw7+01qIX(141ar)VMKt9C9I6_ug3uJ&~Fm7F>ix9oA z0GpD=A9IWj7JvzjG(v`UWZN7xD#Qyah!6k^2K+VU0t9#uKn`6N@Z~e*IKZZ0=@Z!y zUeJpj%wjfnfzvwNk-snLfK5G6l)sL!f?k9`95qNFq4dJQz65|x2QY!ul2wEpxS$`5 z@qk?hm5w+uV@@@QM-N1pzKA^`2R}f}pK98>Y`P?+ oZ&y(Kzf#I9>TZ~y`p#Jiv$np{KK@1b8qb06dmeI&F)&yI0CTw-i~s-t literal 0 HcmV?d00001 diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListNext.gif b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListNext.gif new file mode 100644 index 0000000000000000000000000000000000000000..f886677c4ce8d59488630f10f93da00057a7f328 GIT binary patch literal 300 zcmZ?wbhEHblw*)$Xkh>W$-V>H+S-zmlH%gx{QUgf+}!N!?5wP;YHDgqN=kBaaxyY9 zQc_Z4Vq!uG!K&nA@GO(^(pwO3Msdn-bPtNIC1v(me z+Se-1>a3WsW?gjNi=ZD_PK!28EV{vR>cxVM6&CECnuUcGj-8DSTM`Wt_8;DGjjWZEbByNl9^WaejV&Zfx(O#HhJn01^yb^6T7G`+JIPqVYJ KgzG6XSOWl;6;t5= literal 0 HcmV?d00001 diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListPrevious.gif b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListPrevious.gif new file mode 100644 index 0000000000000000000000000000000000000000..0324abcc3016030f37858a0f4fc1336f19dc74d7 GIT binary patch literal 292 zcmZ?wbhEHblw*)$Xkh>W$-V>H+S%8H7Lva+(0l9J-$;#yi-8X6jEYHBJfDspmi zGBPq!Qc_}KVnRYfTwGjWeMAw8KUo+V7}yweK&nA@GO#XOpxDQ^S;J}7x;I=sN*B*< zVc4^1@`{s(Og1dIP;mNfP|HH22oo9MzNH}{Q#cn~etC9bSK3l@woj{Bb=E!klsA!$ zIjHB`r)f;5+Ra-WBwzggU+Yv^?cC7D*u-F6R_?>V%v9Lh$HS2`*&sS&hH@y!oVga9 z%^w{x(%KQR?C(a#JWUvMR D8N*OV literal 0 HcmV?d00001 diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListPrevious_D.gif b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/ListPrevious_D.gif new file mode 100644 index 0000000000000000000000000000000000000000..e85edac260131b3e243ab26846c13b836a8e8dca GIT binary patch literal 292 zcmZ?wbhEHblw*)$Xkh>WZEbC3Wo1Q0MOj%{Nl8g@ad9IfBP}g04Gj%7H8m9#6*)OM z85tQVDJd~AF(Dx#E-o&xKB5T4pDc_F46F<~Ak`o{8CVx4DE9Gf)^J?4?hRMZqYLLs z81^ihyyD~`lMM?t6r6q=)V$CrLPtipZ)r%#6xIcoU!GmqmA2HJ?bB*jopnz>#X&Te1c5@ep$``-?*E&^JJ2$kkH!)b3mHRL-F&6gr@o?l!Hi*ucp&ZIFXRZY& z6Wan`K4upFIlip?ynL%CuU*H#ZL@_ko8TUSO_^IP1 { return null; } + } + if (wtvnewsserver.username) + wtvnews.initializeUsenet("127.0.0.1", service_config.local_nntp_port, tls_options, wtvnewsserver.username, wtvnewsserver.password); + else + wtvnews.initializeUsenet("127.0.0.1", service_config.local_nntp_port, tls_options); +} else { + if (service_config.upstream_auth) + wtvnews.initializeUsenet(service_config.upstream_address, service_config.upstream_port, service_config.upstream_tls || null, service_config.upstream_auth.username || null, service_config.upstream_auth.password || null); + else + wtvnews.initializeUsenet(service_config.upstream_address, service_config.upstream_port, service_config.upstream_tls || null); +} + +async function throwError(e) { + console.log(e); + const errpage = wtvshared.doErrorPage(400 + " " + e.toString(), null, e.toString()); + sendToClient(socket, errpage[0], errpage[1]); +} + +function isToday (chkdate) { + const today = new Date() + return chkdate.getDate() === today.getDate() && + chkdate.getMonth() === today.getMonth() && + chkdate.getFullYear() === today.getFullYear() +} + +async function WebTVListGroup(group) { + const page_limit_default = 100; + wtvnews.connectUsenet().then(() => { + wtvnews.selectGroup(group).then((response) => { + let limit_per_page = (request_headers.query.limit) ? parseInt(request_headers.query.limit) : page_limit_default; + const page = (request_headers.query.chunk) ? parseInt(request_headers.query.chunk) : 0; + let page_start = (limit_per_page * page) + 1; + let page_end = (page + 1) * limit_per_page; + if (page_end > response.group.high) { + page_end = response.group.high; + limit_per_page = (page_end - (limit_per_page / (page + 1))) + limit_per_page; + } + wtvnews.listGroup(group, page, limit_per_page).then((response) => { + if (response.code === 211) { + let NGCount = response.group.number; + const NGArticles = response.group.articleNumbers; + page_start = (limit_per_page * page) + 1; + page_end = (page + 1) * limit_per_page; + wtvnews.getHeaderObj(NGArticles).then((messages) => { + NGCount = NGArticles.length; + messages = wtvnews.sortByResponse(messages); + wtvnews.quitUsenet(); + headers = `200 OK +Connection: Keep-Alive +Content-Type: text/html +wtv-expire: News.aspx?group=${request_headers.query.group}` + data = ` + + +${request_headers.query.group} + + + +
+ + + +Group: ${request_headers.query.group} + + + +
+ +` + if (NGCount === 0 || isNaN(NGCount)) { + data += `This group has no postings`; + } else { + data += NGCount + " posting"; + if (NGCount !== 1) + data += "s" + } + data += ` + +
+ +`; + if (NGCount > 0) { + data += ` + + + + + + +
+${(page > 0) ? `` : ``} + + + + + + +${(page_end < NGCount) ? `` : ``} + +
+ +
+${page_start}-${page_end} +
+ +
+
`; + } + data += ` + + + + + + + +
+
+ +
+
+ +
+
` + if (NGCount > 0) { + Object.keys(messages).forEach(function (k) { + const message = messages[k].article; + const has_relation = (messages[k].relation !== null) ? true : false; + const date_obj = new Date(Date.parse(message.headers.DATE)); + const date = (isToday(date_obj)) ? strftime("%I:%M %p", date_obj) : strftime("%b %d '%y", date_obj) + data += ` + + +
+ + + +${(has_relation) ? ` +
•` : ''} + + +${(message.headers.SUBJECT) ? wtvshared.htmlEntitize(message.headers.SUBJECT) : "(No Subject)"} + +
+ +${(message.headers.FROM.indexOf(' ') > 0) ? message.headers.FROM.split(' ')[0] : message.headers.FROM}, ${date} +
+
+
`; + }); + } + data += ` +
+ + + + + +
+ +
+
+ +
+
+ + +
+ + + +`; + + sendToClient(socket, headers, data); + }).catch((e) => { + // getHeaderObj err + throwError(e) + });; + } + }).catch((e) => { + // listGroup error + throwError("No such group"); + }); + }).catch((e) => { + // selectGroup error + throwError("No such group") + }); + }).catch((e) => { + // connect error + throwError(e) + }); +} + +async function WebTVShowMessage(group, article) { + const theArticle = parseInt(article); + wtvnews.connectUsenet().then(() => { + wtvnews.selectGroup(group).then((response) => { + wtvnews.getArticle(theArticle).then((response) => { + wtvnews.quitUsenet(); + headers = `200 OK +Content-type: text/html`; + let signature = null; + let message_colors = session_data.mailstore.defaultColors; + const display_signature = true; // todo make a toggle + const message = wtvnews.parseAttachments(response); + const message_body = message.text; + let attachments = null; + let signature_index = null; + wtvnews.debug(message); + if (message.attachments) attachments = message.attachments; + if (attachments) { + if (Object.keys(attachments).length > 0) { + Object.keys(attachments).forEach((k) => { + if (attachments[k].filename === "wtv_signature.html" && attachments[k].content_type.match(/text\/html/)) { + signature = attachments[k].data; + signature_index = k; + return false; + } + }); + if (signature_index) attachments.splice(signature_index, 1); + } + } + + if (message_body.indexOf(" + + +${(response.article.headers.SUBJECT) ? wtvshared.htmlEntitize(response.article.headers.SUBJECT) : '(No subject)'} + + + + + + + + + + + + +
+ +   + + +
+ +Post +
+Group: + +${wtvshared.htmlEntitize(response.article.headers.NEWSGROUPS)} +
+Date: +${strftime("%a, %b %e, %Y, %I:%M%P", new Date(Date.parse(response.article.headers.DATE)))} +
+From: +`; + if (message.from_name !== message.from_addr) { + data += `${wtvshared.htmlEntitize(message.from_addr)} `; + } else { + data += `${wtvshared.htmlEntitize(response.article.headers.FROM)}`; + } + + data += `
+ +
Subject: +${(response.article.headers.SUBJECT) ? wtvshared.htmlEntitize(response.article.headers.SUBJECT) : '(No subject)'} +
+

+ + + +
+ +
+`; + let allow_html = false; + let body_data = ''; + let attachment_data = ''; + let signature_data = ''; + + if (message_body) { + if (message_body.indexOf("") >= 0) { + allow_html = true; + } + body_data += (allow_html) ? wtvshared.sanitizeSignature(message_body) : wtvshared.htmlEntitize(message_body, true) + body_data += `

`; + } + + if (signature) signature_data += wtvshared.sanitizeSignature(signature); + + + if (attachments) { + if (attachments[0]) { + if (attachments[0].filename === "message.html") { + body_data += wtvshared.sanitizeSignature(attachments[0].data); + delete attachments[0]; + } + } + const supported_images = /image\/(jpe?g|png|gif|x-wtv-bitmap)/; + const supported_audio = /audio\/(mp[eg|2|3]|midi?|wav|x-wav|mod|x-mod)/; + attachments.forEach((v, k) => { + if (v.content_type) { + if (v.content_type.match(supported_images)) + attachment_data += `

`; + else if (v.content_type.match(supported_audio)) + attachment_data += ` +
  ${(v.filename) ? (v.filename) : "Audio file"} (${v.content_type.split('/')[1]} attachment) + +


`; + else if (v.content_type.match("text/html")) + attachment_data += wtvshared.sanitizeSignature(v.data); + else + attachment_data += `
A file ${(v.filename) ? `(${v.filename}) ` : ''}that WebTV cannot use, with type ${v.content_type} is attached to this message.` + } + }); + } + /* + if (message.url) { + data += `Included Page: ${wtvshared.htmlEntitize(message.url_title).replace(/'/gi, "'")}`; + } + */ + data += body_data; + data += signature_data + "

"; + data += attachment_data; + data += "

"; + sendToClient(socket, headers, data); + + }).catch((e) => { + // no such article + const post_unavailable_file = this.wtvshared.getServiceDep('wtv-news/post-unavailable.html'); + console.log(e); + if (fs.existsSync(post_unavailable_file)) { + headers = "200 OK\nContent-type: text/html"; + data = fs.readFileSync(post_unavailable_file).toString('ascii').replace("${group}", group).replace("${minisrv_config.config.service_logo}", minisrv_config.config.service_logo).replace("${message_colors.bgcolor}",session_data.mailstore.defaultColors.bgcolor); + sendToClient(socket, headers, data); + } else { + throwError(e); + } + }); + }).catch((e) => { + // no such group + throwError(e); + }); + }).catch((e) => { + //no connection + throwError(e); + }); +} + +function WebTVSearchGroups(search) { + wtvnews.connectUsenet().then(() => { + wtvnews.listGroups(search).then((response) => { + wtvnews.quitUsenet(); + headers = `200 OK +Content-type: text/html +wtv-expire-all: News.aspx?search=`; + + data = ` + + +${(response.length === 0) ? "No " : ""}Discussion groups found + + + + + +
+ + + +
+ +${(response.length === 0) ? "No " : ""}Discussion groups found +
+
+
+`; + + if (response.length === 0) { + data += `There are no discussion groups that match your request. Do you want to look for something else?`; + } else { + response.forEach((group) => { + data += `
+
+ + +
+ + +
+${group.name} + + +` + if (group.description) { + data += `
${group.description}` + } + data += "
"; + }); + } + + data += ` +
+ + + + +
+ + + +
+
+ +
+ + + +
+ +
+Do you want to look for something else?
+ +
+ +  + + + +
+
+ +`; + sendToClient(socket, headers, data); + }).catch((e) => { + // listGroups error + throwError(e); + }); + + }).catch((e) => { + // no connection + throwError(e); + }); +} + + +if (!wtvnews.client) { + const errpage = wtvshared.doErrorPage(); + headers = errpage[0]; + data = errpage[1]; +} else { + request_is_async = true; + if (request_headers.query.search) { + WebTVSearchGroups(request_headers.query.search) + } else if (request_headers.query.group) { + if (request_headers.query.article) { + WebTVShowMessage(request_headers.query.group, request_headers.query.article); + } else { + WebTVListGroup(request_headers.query.group); + } + } else { + // redirect to lobby if no understandable queries passed + headers = "300 OK\nLocation: wtv-news:/lobby"; + sendToClient(socket, headers, null); + } +} + \ No newline at end of file diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/home.aspx.js b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/home.aspx.js new file mode 100644 index 00000000..5d7e5674 --- /dev/null +++ b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/Pages/Discuss/home.aspx.js @@ -0,0 +1,72 @@ +const minisrv_service_file = true; + +// max of 6, any more will be ignored + +headers = `200 OK +Connection: Keep-Alive +Content-Type: text/html` + +data = ` + + +Featured discussion groups + + + + + + +
+ + + +
+ +Featured discussions +
+
+
+`; + +const featuredGroups = minisrv_config.services[minisrv_config.services[service_name].usenet_service].featuredGroups; +const limit = 6; +while (featuredGroups.length > limit) featuredGroups.pop(); // remove anything passing our limit + +function printGroup(group) { + return `${group.name}
${group.description}
`; +} + +// evens +Object.keys(featuredGroups).forEach((k) => { if (k % 2 === 0) { data += printGroup(featuredGroups[k]); } }); + +if (featuredGroups.length > 1) data += `
`; + +// odds +Object.keys(featuredGroups).forEach((k) => { if (k % 2 !== 0) data += printGroup(featuredGroups[k]); }); + + +data += ` +
+
+ + + +
+ +
+Type a discussion topic
+ +
+ +  + + + +
+
+ +`; \ No newline at end of file diff --git a/zefie_wtvp_minisrv/includes/classes/WTV-MSNTV2.js b/zefie_wtvp_minisrv/includes/classes/WTV-MSNTV2.js index 61602956..a5a38540 100644 --- a/zefie_wtvp_minisrv/includes/classes/WTV-MSNTV2.js +++ b/zefie_wtvp_minisrv/includes/classes/WTV-MSNTV2.js @@ -27,6 +27,7 @@ class WTVMSNTV2 { this.tlsContext = this.loadTlsContext(); this.forgeTlsCredentials = this.loadForgeTlsCredentials(); this.server = net.createServer((socket) => this.handleConnection(socket)); + this.tokens = {}; this.mimeTypes = { html: 'text/html', htm: 'text/html', diff --git a/zefie_wtvp_minisrv/includes/classes/WTVShared.js b/zefie_wtvp_minisrv/includes/classes/WTVShared.js index 61abedd8..14684866 100644 --- a/zefie_wtvp_minisrv/includes/classes/WTVShared.js +++ b/zefie_wtvp_minisrv/includes/classes/WTVShared.js @@ -21,6 +21,7 @@ class WTVShared { process = require('process'); shenanigans = null; appdir = this.path.resolve(__dirname + this.path.sep + ".." + this.path.sep + ".."); + tokens = {}; minisrv_config = []; @@ -629,6 +630,79 @@ class WTVShared { return this.fixPathSlashes(check_path); } + /** + * Get the session data (BoxID, UserID, creation time, expiry) associated with a given token, also deletes the token if expired. + * @param {string} token + * @return {object|null} { boxID, userId, created, expires } for the token, or null if token is invalid/expired + */ + getTokenData(token) { + const session = this.tokens[token]; + if (session && session.expires > Date.now()) { + return { boxID: session.boxID, userId: session.userId, created: session.timestamp, expires: session.expires }; + } + this.deleteToken(token); + return null; + } + + deleteToken(token) { + delete this.tokens[token]; + this.saveTokens(); + } + + mkdirRecursive(dirPath) { + if (!this.path.isAbsolute(dirPath)) { + dirPath = this.getAbsolutePath(this.parentDirectory + this.path.sep + dirPath); + } + const parts = dirPath.split(this.path.sep); + let currentPath = ''; + for (const part of parts) { + if (part) { + if (currentPath === '') { + currentPath = part; + } else { + currentPath += this.path.sep + part; + } + if (!this.fs.existsSync(currentPath)) { + try { + this.fs.mkdirSync(currentPath); + } catch (e) { + if (e.code !== 'EEXIST') { + throw e; + } + } + } + } + } + } + + saveTokens() { + const session_store = this.minisrv_config.config.SessionStore + this.path.sep + "msntv2"; + if (!this.fs.existsSync(session_store)) { + this.mkdirRecursive(session_store); + } + const tokenFile = this.getAbsolutePath(this.path.join(session_store, `tokens.json`)); + this.fs.writeFile(tokenFile, JSON.stringify(this.tokens), (err) => { + if (err) { + console.error('[WTV-MSNTV2] Error writing token file:', err); + } + }); + } + + /** + * Store a token with its associated BoxID and UserID. + * @param {string} token + * @param {string} boxID + * @param {number} userId + * @param {string|null} expiresTime - Optional expiration time for the token, otherwise uses server config defaults + */ + storeToken(token, boxID, userId, expiresTime = null) { + delete this.tokens[token]; // ensure any existing token with the same value is removed before storing new data + this.tokens[token] = { boxID, userId, timestamp: Date.now(), expires: expiresTime ? new Date(expiresTime).getTime() : Date.now() + (this.minisrv_config.services[this.service_name]?.token_expiry || 3600) * 1000 }; // 1 hour expiry + this.saveTokens(); + this.debug(" * MSNTV2 stored token for BoxID %s (UserID: %s), token expires in %d seconds", boxID, userId, (this.tokens[token].expires - Date.now()) / 1000); + } + + /** * Detects if the client is in MiniBrowser mode * @param {object} ssid_session diff --git a/zefie_wtvp_minisrv/includes/config.json b/zefie_wtvp_minisrv/includes/config.json index 26f9ea76..129fca01 100644 --- a/zefie_wtvp_minisrv/includes/config.json +++ b/zefie_wtvp_minisrv/includes/config.json @@ -527,8 +527,10 @@ "key": "%ServiceDeps%/msntv2/minisrv.key" }, "modules": [ - "WTVRegister" - ] + "WTVRegister", + "WTVNews" + ], + "usenet_service": "wtv-news" } }, "favorites": {