]> git.xonotic.org Git - xonotic/darkplaces.git/commit
rcon server: add an explicit check against empty password, instead of assuming the...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 26 Apr 2017 02:33:43 +0000 (02:33 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 26 Apr 2017 02:33:43 +0000 (02:33 +0000)
commit91e898971b8ec935b2d25e7cd0d26eb0c6a8d8a7
treeb00d48a9bc297b97ca789d0c34aa59ae6931a8d9
parente258e3fe3240de023926bc7642159fc80e6fee62
rcon server: add an explicit check against empty password, instead of assuming the calling code is correct.

This logic had a bug in the past that had been introduced by r8886 and
accidentally fixed when introducing multi-account support in r9420. The bug was
that rcon_password being empty led to the empty password being accepted in some
cases, as there was never any explicit logic to handle that in rcon - it was
more "accidentally" rejected by a packet formatting check which does not apply
to srcon as the empty password wouldn't be empty over the wire.

In other words: DP builds from [r8886, r9419] had a serious vulnerability and
the only workaround is to always have rcon_password set.

The check added here will complain and reject in case the calling code for some
reason no longer prevents empty passwords from being accepted.

Also adding comments to the new logic explaining how it prevents the empty
password from being accepted.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12334 d7cf8633-e32d-0410-b094-e92efae38249
netconn.c