Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.96k stars 536 forks source link

verify email crached server #91

Closed djsakisd closed 5 years ago

djsakisd commented 5 years ago

Hi @Ylianst

I installed on ubuntu 16 the server with node 8.15.0 everything works fine including intel amt and software agent but i have a server crash each time i'm trying to verify email adrress.

Here is the log : '''/root/meshcentral/node_modules/meshcentral/webserver.js:631 obj.parent.DispatchEvent(['*', 'server-users', user._id], obj, { etype: 'user', username: user.name, account: obj.CloneSafeUser(user), action: 'accountchange', msg: 'Verified email of user ' + EscapeHtml(user.name) + ' (' + EscapeHtml(userinfo.email) + ')', domain: domain.id }); ^

ReferenceError: userinfo is not defined at /root/meshcentral/node_modules/meshcentral/webserver.js:631:284 at newArguments.(anonymous function) (/root/meshcentral/node_modules/nedb/lib/executor.js:29:17) at Cursor.execFn (/root/meshcentral/node_modules/nedb/lib/datastore.js:484:12) at callback (/root/meshcentral/node_modules/nedb/lib/cursor.js:126:19) at /root/meshcentral/node_modules/nedb/lib/cursor.js:193:12 at /root/meshcentral/node_modules/nedb/lib/datastore.js:329:14 at Object.async.eachSeries (/root/meshcentral/node_modules/nedb/node_modules/async/lib/async.js:130:20) at /root/meshcentral/node_modules/nedb/lib/datastore.js:323:11 at fn (/root/meshcentral/node_modules/nedb/node_modules/async/lib/async.js:582:34) at Immediate._onImmediate (/root/meshcentral/node_modules/nedb/node_modules/async/lib/async.js:498:34) '''

Ylianst commented 5 years ago

Thank you for the report. Working on it now!

Ylianst commented 5 years ago

Just published MeshCentral v0.2.7-v with a fix for this. Let me know if it works for you.

djsakisd commented 5 years ago

Hi @Ylianst

I can verify issue is resolved now, but i still can't use the reset pass feature, when i type my email to test reset it redirect to this url /resetaccount and gives me this error Unauthorized...

My email address is verified and i'm the only admin user on server. No error is shown in error.log regarding the above.

Thanks for fixing the issue so fast.

Ylianst commented 5 years ago

Oh. Thanks for pointing that out. Looking at the code, if the server was set to not accept new account, it would also give an unauthorized on password recovery. Just published v0.2.7-x with a fix for that. Try it out and let me know. Thanks.

djsakisd commented 5 years ago

Hi @Ylianst

I can verify now is working perfectly. I'm closing the issue as its resolved.