fix(Core/MailHandler): Security check (#2889)

This commit is contained in:
Kitzunu
2020-06-03 08:42:12 +02:00
committed by GitHub
parent 5a0a12c6b0
commit 3d9d51977d
+5 -2
View File
@@ -24,8 +24,11 @@ bool WorldSession::CanOpenMailBox(uint64 guid)
{ {
if (guid == _player->GetGUID()) if (guid == _player->GetGUID())
{ {
sLog->outError("%s attempt open mailbox in cheating way.", _player->GetName().c_str()); if (_player->GetSession()->GetSecurity() < SEC_MODERATOR)
return false; {
sLog->outError("%s attempt open mailbox in cheating way.", _player->GetName().c_str());
return false;
}
} }
else if (IS_GAMEOBJECT_GUID(guid)) else if (IS_GAMEOBJECT_GUID(guid))
{ {