]> 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)
committerRudolf Polzer <divVerent@xonotic.org>
Wed, 26 Apr 2017 02:45:22 +0000 (04:45 +0200)
commit245dad3535829166a206e03cfb4d0c188a19975c
treeb00d48a9bc297b97ca789d0c34aa59ae6931a8d9
parentc22efd760f5d44c6d925b4d7feee6480c83719dd
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
::stable-branch::merge=91e898971b8ec935b2d25e7cd0d26eb0c6a8d8a7
netconn.c