Commit a5931646 authored by nanahira's avatar nanahira

Merge branch 'mc'

parents 4179965b 7c59ec18
......@@ -3190,6 +3190,9 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
room=ROOM_all[client.rid]
return false unless room
#log.info info
if info.mainc > 256 or info.sidec > 256 # Prevent attack, see https://github.com/Fluorohydride/ygopro/issues/2174
CLIENT_kick(client)
return true
buff_main = (info.deckbuf[i] for i in [0...info.mainc])
buff_side = (info.deckbuf[i] for i in [info.mainc...info.mainc + info.sidec])
client.main = buff_main
......
......@@ -4074,6 +4074,10 @@
if (!room) {
return false;
}
if (info.mainc > 256 || info.sidec > 256) {
CLIENT_kick(client);
return true;
}
buff_main = (function() {
var m, ref3, results;
results = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment