Fixes a bug that made the server to deny non-empty passwords from players connecting the first time.

This commit is contained in:
Perttu Ahola 2011-07-31 15:51:24 +03:00
parent a27200a7a1
commit 19ea901cf2
2 changed files with 4 additions and 1 deletions

@ -3,6 +3,9 @@ Minetest-c55 changelog
This should contain all the major changes. This should contain all the major changes.
For minor stuff, refer to the commit log of the repository. For minor stuff, refer to the commit log of the repository.
2011-07-31_3:
- Fixes a bug that made the server to deny non-empty passwords from players connecting the first time
2011-07-31_2: 2011-07-31_2:
- Fixes a bug that caused the server to always read an empty password from the client when a client connected. - Fixes a bug that caused the server to always read an empty password from the client when a client connected.

@ -2047,7 +2047,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
/*dstream<<"Server: Client gave password '"<<password /*dstream<<"Server: Client gave password '"<<password
<<"', the correct one is '"<<checkpwd<<"'"<<std::endl;*/ <<"', the correct one is '"<<checkpwd<<"'"<<std::endl;*/
if(password != checkpwd) if(password != checkpwd && m_authmanager.exists(playername))
{ {
derr_server<<DTIME<<"Server: peer_id="<<peer_id derr_server<<DTIME<<"Server: peer_id="<<peer_id
<<": supplied invalid password for " <<": supplied invalid password for "