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
4.24k stars 568 forks source link

Bug: Email verification bypassed on account creation. #1859

Open MatinatorX opened 4 years ago

MatinatorX commented 4 years ago

@Ylianst This works if you create the user yourself, but if the user creates an account from the login screen themselves, the system automatically logs them in immediately after account creation, bypassing verification. Only if the user then logs out and tries to log back will the verification screen show.

Originally posted by @MatinatorX in https://github.com/Ylianst/MeshCentral/issues/1188#issuecomment-618829997

Opening a new issue since this bug is still present. I also spun up a fresh VPS to test on a new MeshCentral install.

After account creation, email validation successfully blocks login attempts until the email address is validated. However, as part of the account creation process, users are logged in automatically after creation and without email verification. Logging out and attempting to log back in correctly blocks the attempt. This means users who know the domain suffix can have unrestricted access to all default devices and groups after account creation until they are logged out.

Ylianst commented 4 years ago

Ok, thanks for raising this up again. I need some sort of issue voting system.

Ylianst commented 4 years ago

Can you describe step-by-step how to make this problem happen? How is the account created? When options are selected? A quick example would be much appreciated. It will avoid me having to try to guess. Thanks.

MatinatorX commented 4 years ago

Of course:

Clicking "Logout" then trying to log back in with the user you just created blocks the attempt as it should with the standard "Email verification required, check your mailbox and click the confirmation link." screen.

MatinatorX commented 3 years ago

@Ylianst I know it's been a while and things are very busy, but just wanted to check if there had been time to look into this at all. We are starting to make use of tenancy and with that the risk of "spam" accounts goes up even with domain filtering. Would be amazing if users did not automatically get logged in on account creation and if accounts did not get added until email verification or were automatically deleted after a day or so if email verification was not completed.

I haven't yet heard of this being abused in any way, but can definitely see it being a problem in the future as the Mesh userbase continues to grow.