BertHeesakkers / IGADPiGameServer

Game server created for educational purposes for IGAD (Breda University of Applied Sciences, the Netherlands)
3 stars 1 forks source link

Wrong student ID #1

Closed simonrenger closed 6 years ago

simonrenger commented 6 years ago

You can still break the server with a wrong student ID.

RakNet::RakString a_LoginID = "17009636";

Zandor300 commented 6 years ago

I guess the problem lies here: https://github.com/BertHeesakkers/IGADPiGameServer/blob/1597cab67ac793a2d026abc804ebcf8e8bd5931b/Source/Server/Server.cpp#L354

Could be fixed by doing a regex check (if it crashes because of the extra length your example has) but could also crash if the student id is wrong entirely...

BertHeesakkers commented 6 years ago

The server should return the EServerError_UserDataUnavailable message as it does in the other 2 cases where the user data was not found. I have removed the assert and replaced it with said message.