Jump to content

master.jkhub.org returns malformed data


Recommended Posts

Posted

Hey guys!

 

just a little bug I currently noticed concerning jkhub's masterserver.

It returns data in a wrong format.

It's not a major bug or something but depending on the code used to parse it, it can fail.

 

This is what the server returns:

 

master.jkhub.orguplvf.png

 

correct would be:

- on the top: ÿÿÿÿgetserversResponse\n\x00\\[...]

- on the bottom: EOF and not EOT because EOT means there will be another packet containing servers EOF means it's the last. Also there are three \x00 bytes too much

 

this is how it should be:

master.ouned.decud7u.png

 

 

I just felt like reporting even though it works in game.

 

ouned  B)

Posted

master.jkhub.org uses dpmaster as its backend, and I've noticed that first artefact too.

 

Your second bug is invalid though. The UDP protocol does not guarantee packet ordering, so it wouldn't make sense to have a "terminator" packet with EOF like basejka has. This is a mistake that Raven Software introduced into the protocol, the EOF packet should not be distinguished from EOT. However, the extra null bytes at the end of the packet is something I don't really want there either.

 

I could fix this by using my own master server implementation, but I don't know of any implementations that have a problem dealing with dpmaster's server list responses. If it's a major issue, I can change it.

Posted

well i noticed it only because my own code didn't work. I started reading at byte 0x19 and went trough the list like that...

maybe it's better to search for the first backslash in this case.

I would definitely fix the 0x00 bug on the end because like that it could also be seen as an ip address / port (it also has 6 bytes)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...