mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Minor fixes.
This commit is contained in:
parent
518d4d1017
commit
027a9944f5
5 changed files with 9 additions and 6 deletions
|
@ -342,8 +342,10 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
||||||
// If the mesh agent web socket is closed, clean up.
|
// If the mesh agent web socket is closed, clean up.
|
||||||
ws.on('close', function (req) {
|
ws.on('close', function (req) {
|
||||||
if (obj.nodeid != null) {
|
if (obj.nodeid != null) {
|
||||||
//console.log('Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + obj.agentInfo.agentId);
|
var agentId = 'Unknown';
|
||||||
obj.parent.parent.debug(1, 'Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + obj.agentInfo.agentId);
|
if (obj.agentInfo && obj.agentInfo.agentId) { agentId = obj.agentInfo.agentId; }
|
||||||
|
//console.log('Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + agentId);
|
||||||
|
obj.parent.parent.debug(1, 'Agent disconnect ' + obj.nodeid + ' (' + obj.remoteaddrport + ') id=' + agentId);
|
||||||
|
|
||||||
// Log the agent disconnection
|
// Log the agent disconnection
|
||||||
if (obj.parent.wsagentsDisconnections[obj.nodeid] == null) {
|
if (obj.parent.wsagentsDisconnections[obj.nodeid] == null) {
|
||||||
|
|
|
@ -130,7 +130,7 @@ module.exports.CreateMeshMail = function (parent) {
|
||||||
|
|
||||||
// Set all the options.
|
// Set all the options.
|
||||||
var options = { username: username, email: email, servername: domain.title };
|
var options = { username: username, email: email, servername: domain.title };
|
||||||
options.cookie = obj.parent.encodeCookie({ u: domain.id + '/' + username, e: email, a: 1 }, obj.mailCookieEncryptionKey);
|
options.cookie = obj.parent.encodeCookie({ u: domain.id + '/' + username.toLowerCase(), e: email, a: 1 }, obj.mailCookieEncryptionKey);
|
||||||
|
|
||||||
// Send the email
|
// Send the email
|
||||||
obj.pendingMails.push({ to: email, from: parent.config.smtp.from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
obj.pendingMails.push({ to: email, from: parent.config.smtp.from, subject: mailReplacements(template.htmlSubject, domain, options), text: mailReplacements(template.txt, domain, options), html: mailReplacements(template.html, domain, options) });
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.2.7-y",
|
"version": "0.2.8-b",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"_letsencrypt": {
|
"_letsencrypt": {
|
||||||
|
"__comment__": "If your are having problems with Let's Encrypt, use https://letsdebug.net/ first to debug it.",
|
||||||
"email": "myemail@myserver.com ",
|
"email": "myemail@myserver.com ",
|
||||||
"names": "myserver.com,customer1.myserver.com",
|
"names": "myserver.com,customer1.myserver.com",
|
||||||
"rsaKeySize": 3072,
|
"rsaKeySize": 3072,
|
||||||
|
|
|
@ -639,9 +639,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
if ((idsplit.length != 2) || (idsplit[0] != domain.id)) {
|
if ((idsplit.length != 2) || (idsplit[0] != domain.id)) {
|
||||||
res.render(obj.path.join(obj.parent.webViewsPath, 'message'), { title: domain.title, title2: domain.title2, title3: 'Account Verification', message: 'ERROR: Invalid domain. <a href="' + domain.url + '">Go to login page</a>.' });
|
res.render(obj.path.join(obj.parent.webViewsPath, 'message'), { title: domain.title, title2: domain.title2, title3: 'Account Verification', message: 'ERROR: Invalid domain. <a href="' + domain.url + '">Go to login page</a>.' });
|
||||||
} else {
|
} else {
|
||||||
obj.db.Get('user/' + cookie.u, function (err, docs) {
|
obj.db.Get('user/' + cookie.u.toLowerCase(), function (err, docs) {
|
||||||
if (docs.length == 0) {
|
if (docs.length == 0) {
|
||||||
res.render(obj.path.join(obj.parent.webViewsPath, 'message'), { title: domain.title, title2: domain.title2, title3: 'Account Verification', message: 'ERROR: Invalid username \"' + EscapeHtml(cookie.u) + '\". <a href="' + domain.url + '">Go to login page</a>.' });
|
res.render(obj.path.join(obj.parent.webViewsPath, 'message'), { title: domain.title, title2: domain.title2, title3: 'Account Verification', message: 'ERROR: Invalid username \"' + EscapeHtml(idsplit[1]) + '\". <a href="' + domain.url + '">Go to login page</a>.' });
|
||||||
} else {
|
} else {
|
||||||
var user = docs[0];
|
var user = docs[0];
|
||||||
if (user.email != cookie.e) {
|
if (user.email != cookie.e) {
|
||||||
|
|
Loading…
Reference in a new issue