How to determine which accounts have an empty password
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
How to determine which accounts have an empty password
Is there any way as an administrator that I can determine which accounts have an empty password so I can automatically limit their privileges? It seems this is not possible due to how SRP works. So apparently the only workaround is attempting to login to every account myself, which is understandably a less than ideal solution particularly for over 1 million registered players.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: How to determine which accounts have an empty password
Minetest provides minetest.check_password_entry for this purpose. SRP doesn't require a network, it can be done on local data. I made a mod for CTF that asked users to change their password if their password was ""
Code: Select all
local function has_password(pname)
local handler = minetest.get_auth_handler()
local auth = handler.get_auth(pname)
return auth and not minetest.check_password_entry(pname, auth.password, "")
end
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: How to determine which accounts have an empty password
Thanks I didn't even know about that API function! You've been an immense help as always!
Who is online
Users browsing this forum: Google [Bot] and 18 guests