mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
implement some user input length checks.
This commit is contained in:
parent
323d5f4408
commit
fc10d85d27
5 changed files with 44 additions and 9 deletions
|
@ -4258,6 +4258,16 @@ namespace HISP.Server
|
|||
string profilePage = packetStr.Split('|')[1];
|
||||
profilePage = profilePage.Substring(0, profilePage.Length - 2);
|
||||
sender.LoggedinUser.CharacterId = characterId;
|
||||
|
||||
|
||||
|
||||
if (profilePage.Length > 4000)
|
||||
{
|
||||
byte[] notSaved = PacketBuilder.CreateChat(Messages.ProfileTooLongMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
sender.SendPacket(notSaved);
|
||||
return;
|
||||
}
|
||||
|
||||
sender.LoggedinUser.ProfilePage = profilePage;
|
||||
|
||||
Logger.DebugPrint(sender.LoggedinUser.Username + " Changed to character id: " + characterId + " and set there Profile Description to '" + profilePage + "'");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue