Internationalized RDP login page and added 3FA support.
This commit is contained in:
parent
89e126b976
commit
1f61bc7c2b
|
@ -572,6 +572,7 @@
|
||||||
<Content Include="views\login.handlebars" />
|
<Content Include="views\login.handlebars" />
|
||||||
<Content Include="views\message.handlebars" />
|
<Content Include="views\message.handlebars" />
|
||||||
<Content Include="views\messenger.handlebars" />
|
<Content Include="views\messenger.handlebars" />
|
||||||
|
<Content Include="views\mstsc.handlebars" />
|
||||||
<Content Include="views\terms-mobile.handlebars" />
|
<Content Include="views\terms-mobile.handlebars" />
|
||||||
<Content Include="views\terms.handlebars" />
|
<Content Include="views\terms.handlebars" />
|
||||||
<Content Include="views\xterm.handlebars" />
|
<Content Include="views\xterm.handlebars" />
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
|
|
||||||
<script language="javascript">
|
|
||||||
function install() {
|
|
||||||
// bind keyboard event
|
|
||||||
window.addEventListener('keydown', function (e) {
|
|
||||||
document.getElementById('output').innerHTML += e.keyCode + ' : "' + e.code + '", <br>';
|
|
||||||
e.preventDefault();
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body onload='install()'>
|
|
||||||
<p id='output'></p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -32,6 +32,7 @@ var meshCentralSourceFiles = [
|
||||||
"../views/message.handlebars",
|
"../views/message.handlebars",
|
||||||
"../views/messenger.handlebars",
|
"../views/messenger.handlebars",
|
||||||
"../views/player.handlebars",
|
"../views/player.handlebars",
|
||||||
|
"../views/mstsc.handlebars",
|
||||||
"../emails/account-check.html",
|
"../emails/account-check.html",
|
||||||
"../emails/account-invite.html",
|
"../emails/account-invite.html",
|
||||||
"../emails/account-login.html",
|
"../emails/account-login.html",
|
||||||
|
@ -61,6 +62,7 @@ var minifyMeshCentralSourceFiles = [
|
||||||
"../views/message.handlebars",
|
"../views/message.handlebars",
|
||||||
"../views/messenger.handlebars",
|
"../views/messenger.handlebars",
|
||||||
"../views/player.handlebars",
|
"../views/player.handlebars",
|
||||||
|
"../views/mstsc.handlebars",
|
||||||
"../public/scripts/agent-desktop-0.0.2.js",
|
"../public/scripts/agent-desktop-0.0.2.js",
|
||||||
"../public/scripts/agent-redir-rtc-0.1.0.js",
|
"../public/scripts/agent-redir-rtc-0.1.0.js",
|
||||||
"../public/scripts/agent-redir-ws-0.1.1.js",
|
"../public/scripts/agent-redir-ws-0.1.1.js",
|
||||||
|
|
|
@ -6318,6 +6318,7 @@
|
||||||
"default.handlebars->container->column_l->p11->deskarea0->deskarea1->3->connectbutton1span",
|
"default.handlebars->container->column_l->p11->deskarea0->deskarea1->3->connectbutton1span",
|
||||||
"default.handlebars->container->column_l->p12->termTable->1->1->0->1->3->connectbutton2span",
|
"default.handlebars->container->column_l->p12->termTable->1->1->0->1->3->connectbutton2span",
|
||||||
"default.handlebars->container->column_l->p13->p13toolbar->1->0->1->3",
|
"default.handlebars->container->column_l->p13->p13toolbar->1->0->1->3",
|
||||||
|
"mstsc.handlebars->main->1->3->1->8->1->0",
|
||||||
"xterm.handlebars->p11->deskarea0->deskarea1->3"
|
"xterm.handlebars->p11->deskarea0->deskarea1->3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -8852,7 +8853,9 @@
|
||||||
"default.handlebars->27->1487",
|
"default.handlebars->27->1487",
|
||||||
"default.handlebars->27->1533",
|
"default.handlebars->27->1533",
|
||||||
"default.handlebars->27->1542",
|
"default.handlebars->27->1542",
|
||||||
"default.handlebars->27->1597"
|
"default.handlebars->27->1597",
|
||||||
|
"mstsc.handlebars->main->1->3->1->2->1->0",
|
||||||
|
"mstsc.handlebars->main->1->3->1->2->3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -19679,7 +19682,9 @@
|
||||||
"default.handlebars->27->1661",
|
"default.handlebars->27->1661",
|
||||||
"default.handlebars->27->251",
|
"default.handlebars->27->251",
|
||||||
"default.handlebars->27->280",
|
"default.handlebars->27->280",
|
||||||
"default.handlebars->27->645"
|
"default.handlebars->27->645",
|
||||||
|
"mstsc.handlebars->main->1->3->1->6->1->0",
|
||||||
|
"mstsc.handlebars->main->1->3->1->6->3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -27999,6 +28004,8 @@
|
||||||
"default.handlebars->27->249",
|
"default.handlebars->27->249",
|
||||||
"default.handlebars->27->279",
|
"default.handlebars->27->279",
|
||||||
"default.handlebars->27->644",
|
"default.handlebars->27->644",
|
||||||
|
"mstsc.handlebars->main->1->3->1->4->1->0",
|
||||||
|
"mstsc.handlebars->main->1->3->1->4->3",
|
||||||
"player.handlebars->3->4"
|
"player.handlebars->3->4"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -2208,13 +2208,13 @@
|
||||||
newWindow.opener = null;
|
newWindow.opener = null;
|
||||||
}
|
}
|
||||||
} else if (message.tag == 'novnc') {
|
} else if (message.tag == 'novnc') {
|
||||||
var vncurl = window.location.origin + domainUrl + 'novnc/vnc.html?ws=wss%3A%2F%2F' + window.location.host + '%2Fmeshrelay.ashx%3Fauth%3D' + message.cookie + '&show_dot=1';
|
var vncurl = window.location.origin + domainUrl + 'novnc/vnc.html?ws=wss%3A%2F%2F' + window.location.host + '%2Fmeshrelay.ashx%3Fauth%3D' + message.cookie + '&show_dot=1' + (urlargs.key?('&key=' + urlargs.key):'');
|
||||||
var node = getNodeFromId(message.nodeid);
|
var node = getNodeFromId(message.nodeid);
|
||||||
if (node != null) { vncurl += '&name=' + encodeURIComponentEx(node.name); }
|
if (node != null) { vncurl += '&name=' + encodeURIComponentEx(node.name); }
|
||||||
var newWindow = window.open(vncurl, 'mcnovnc/' + message.nodeid);
|
var newWindow = window.open(vncurl, 'mcnovnc/' + message.nodeid);
|
||||||
newWindow.opener = null;
|
newWindow.opener = null;
|
||||||
} else if (message.tag == 'mstsc') {
|
} else if (message.tag == 'mstsc') {
|
||||||
var rdpurl = window.location.origin + domainUrl + 'mstsc/index.html?ws=' + message.cookie;
|
var rdpurl = window.location.origin + domainUrl + 'mstsc.html?ws=' + message.cookie + (urlargs.key?('&key=' + urlargs.key):'');
|
||||||
var node = getNodeFromId(message.nodeid);
|
var node = getNodeFromId(message.nodeid);
|
||||||
if (node != null) { rdpurl += '&name=' + encodeURIComponentEx(node.name); }
|
if (node != null) { rdpurl += '&name=' + encodeURIComponentEx(node.name); }
|
||||||
var newWindow = window.open(rdpurl, 'mcmstsc/' + message.nodeid);
|
var newWindow = window.open(rdpurl, 'mcmstsc/' + message.nodeid);
|
||||||
|
|
|
@ -6,16 +6,15 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<title>RDP</title>
|
<title>RDP</title>
|
||||||
<script type="text/javascript" src="mstsc.js"></script>
|
<script type="text/javascript" src="mstsc/mstsc.js"></script>
|
||||||
<script type="text/javascript" src="keyboard.js"></script>
|
<script type="text/javascript" src="mstsc/keyboard.js"></script>
|
||||||
<script type="text/javascript" src="rle.js"></script>
|
<script type="text/javascript" src="mstsc/rle.js"></script>
|
||||||
<script type="text/javascript" src="client.js"></script>
|
<script type="text/javascript" src="mstsc/client.js"></script>
|
||||||
<script type="text/javascript" src="canvas.js"></script>
|
<script type="text/javascript" src="mstsc/canvas.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family:sans-serif;
|
font-family:sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
xoverflow: hidden;
|
|
||||||
background-color: black;
|
background-color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,14 +34,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.signinform {
|
.signinform {
|
||||||
width: 330px;
|
width: 380px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formLabel { }
|
.formLabel { }
|
||||||
|
|
||||||
.formControl {
|
.formControl {
|
||||||
width: 210px;
|
width:calc(100% - 16px);
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
|
@ -1627,6 +1627,14 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
render(req, res, getRenderPage('invite', req, domain), getRenderArgs({ messageid: 100 }, req, domain)); // Bad invitation code
|
render(req, res, getRenderPage('invite', req, domain), getRenderArgs({ messageid: 100 }, req, domain)); // Bad invitation code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called to render the MSTSC (RDP) web page
|
||||||
|
function handleMSTSCRequest(req, res) {
|
||||||
|
const domain = getDomain(req);
|
||||||
|
if (domain == null) { parent.debug('web', 'handleMSTSCRequest: failed checks.'); res.sendStatus(404); return; }
|
||||||
|
if ((domain.loginkey != null) && (domain.loginkey.indexOf(req.query.key) == -1)) { res.sendStatus(404); return; } // Check 3FA URL key
|
||||||
|
render(req, res, getRenderPage('mstsc', req, domain), getRenderArgs({}, req, domain));
|
||||||
|
}
|
||||||
|
|
||||||
// Called to process an agent invite request
|
// Called to process an agent invite request
|
||||||
function handleAgentInviteRequest(req, res) {
|
function handleAgentInviteRequest(req, res) {
|
||||||
const domain = getDomain(req);
|
const domain = getDomain(req);
|
||||||
|
@ -4350,6 +4358,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
|
|
||||||
// Setup MSTSC.js if needed
|
// Setup MSTSC.js if needed
|
||||||
if (domain.mstsc === true) {
|
if (domain.mstsc === true) {
|
||||||
|
obj.app.get(url + 'mstsc.html', handleMSTSCRequest);
|
||||||
obj.app.ws(url + 'mstsc/relay.ashx', function (ws, req) {
|
obj.app.ws(url + 'mstsc/relay.ashx', function (ws, req) {
|
||||||
PerformWSSessionAuth(ws, req, false, function (ws1, req1, domain, user) {
|
PerformWSSessionAuth(ws, req, false, function (ws1, req1, domain, user) {
|
||||||
require('./mstsc.js').CreateMstscRelay(obj, obj.db, ws1, req1, obj.args, domain, user);
|
require('./mstsc.js').CreateMstscRelay(obj, obj.db, ws1, req1, obj.args, domain, user);
|
||||||
|
|
Loading…
Reference in New Issue