mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-08-26 12:55:21 -05:00
abort decoding query string on bad values
This commit is contained in:
@@ -5,6 +5,10 @@ def parse_gamespy_message(message):
|
|||||||
messages = {}
|
messages = {}
|
||||||
msg = message
|
msg = message
|
||||||
|
|
||||||
|
if len(msg) == 0 or msg[0] != '\\':
|
||||||
|
# bad command, return nothing
|
||||||
|
return "", ""
|
||||||
|
|
||||||
while len(msg) > 0 and msg[0] == '\\' and "\\final\\" in msg:
|
while len(msg) > 0 and msg[0] == '\\' and "\\final\\" in msg:
|
||||||
# Find the command
|
# Find the command
|
||||||
# Don't search for more commands if there isn't a \final\, save the left over for the next packet
|
# Don't search for more commands if there isn't a \final\, save the left over for the next packet
|
||||||
|
|||||||
Reference in New Issue
Block a user