mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7189] Prevent use wrong security levels (>= SEC_CONSOLE)
This commit is contained in:
parent
d4ce99dfa2
commit
ad03d3c73b
2 changed files with 15 additions and 12 deletions
|
|
@ -791,17 +791,17 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
|||
|
||||
QueryResult *result =
|
||||
loginDatabase.PQuery ("SELECT "
|
||||
"id, " //0
|
||||
"gmlevel, " //1
|
||||
"sessionkey, " //2
|
||||
"last_ip, " //3
|
||||
"locked, " //4
|
||||
"sha_pass_hash, " //5
|
||||
"v, " //6
|
||||
"s, " //7
|
||||
"expansion, " //8
|
||||
"mutetime, " //9
|
||||
"locale " //10
|
||||
"id, " //0
|
||||
"gmlevel, " //1
|
||||
"sessionkey, " //2
|
||||
"last_ip, " //3
|
||||
"locked, " //4
|
||||
"sha_pass_hash, " //5
|
||||
"v, " //6
|
||||
"s, " //7
|
||||
"expansion, " //8
|
||||
"mutetime, " //9
|
||||
"locale " //10
|
||||
"FROM account "
|
||||
"WHERE username = '%s'",
|
||||
safe_account.c_str ());
|
||||
|
|
@ -891,6 +891,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
|||
|
||||
id = fields[0].GetUInt32 ();
|
||||
security = fields[1].GetUInt16 ();
|
||||
if(security > SEC_ADMINISTRATOR) // prevent invalid security settings in DB
|
||||
security = SEC_ADMINISTRATOR;
|
||||
|
||||
K.SetHexStr (fields[2].GetString ());
|
||||
|
||||
time_t mutetime = time_t (fields[9].GetUInt64 ());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7188"
|
||||
#define REVISION_NR "7189"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue