Fixed 404 error with mstsc.html, #3927

Ylian Saint-Hilaire committed May 2, 2022 at 22:09 UTC 96dab9ab3e1f3deb7a9a20f9ee3c5573ee3f3e78
2 files changed +3 -3
rdp/core/type.js
+1 -1
@@ -145,7 +145,7 @@ Type.prototype.read = function(s) {
145
146 if(oldValue !== this.value) {
147 log.error('constant value mismatch ' + oldValue + ' != ' + this.value);
148 - throw new error.ProtocolError("NODE_RDP_CORE_TYPE_CONSTANT_VALUE_MISMATCH");
148 + throw new error.ProtocolError("NODE_RDP_CORE_TYPE_CONSTANT_VALUE_MISMATCH", oldValue, this.value);
149 }
150 }
151 else {
webserver.js
+2 -2
@@ -6028,8 +6028,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
6028 });
6029 }
6030
6031 - // Setup MSTSC.js if needed
6032 - if (domain.mstsc === true) {
6031 + // Setup RDP unless indicated as disabled
6032 + if (domain.mstsc !== false) {
6033 obj.app.get(url + 'mstsc.html', function (req, res) { handleMSTSCRequest(req, res, 'mstsc'); });
6034 obj.app.ws(url + 'mstscrelay.ashx', function (ws, req) {
6035 const domain = getDomain(req);