mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-23 15:05:29 +01:00
Fix singleplayer lockout when changing password (#16673)
This commit is contained in:
@@ -1660,7 +1660,9 @@ void Server::handleCommand_SrpBytesM(NetworkPacket* pkt)
|
||||
srp_verifier_verify_session((SRPVerifier *) client->auth_data,
|
||||
(unsigned char *)bytes_M.c_str(), &bytes_HAMK);
|
||||
|
||||
if (!bytes_HAMK) {
|
||||
// skip authentication check for singleplayer world.
|
||||
const bool is_true_singleplayer = isSingleplayer() && (strcasecmp(playername.c_str(), "singleplayer") == 0);
|
||||
if (!bytes_HAMK && !is_true_singleplayer) {
|
||||
if (wantSudo) {
|
||||
actionstream << "Server: User " << playername << " at " << addr_s
|
||||
<< " tried to change their password, but supplied wrong"
|
||||
|
||||
Reference in New Issue
Block a user