feat(Core/Chat): new argument parsing and unify chat hyperlink parsing (#6243)

This commit is contained in:
Kargatum
2021-10-23 15:15:42 +07:00
committed by GitHub
parent 1101f9dd2a
commit bc9473482e
90 changed files with 4280 additions and 2508 deletions

View File

@@ -46,10 +46,10 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
if (isdigit(channelName[0]))
return;
// pussywizard: restrict allowed characters in channel name to avoid |0 and possibly other exploits
//if (!ObjectMgr::IsValidChannelName(channelName))
if (channelName.find("|") != std::string::npos || channelName.size() >= 100)
if (channelName.size() >= 100 || !DisallowHyperlinksAndMaybeKick(channelName))
{
return;
}
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
{