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