X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=server%2Fmodels%2FGame.js;h=5f9ab734cc7fa91fcc0e3400911496c18636f074;hb=b0116a67818668f55cd2a3b3a323b2c91b5bc332;hp=76a91dc9d76e84629213052345324d90aa86fc7e;hpb=7ec05c0ef6b1a329831d74148652115f9147e3b3;p=vchess.git diff --git a/server/models/Game.js b/server/models/Game.js index 76a91dc9..5f9ab734 100644 --- a/server/models/Game.js +++ b/server/models/Game.js @@ -321,8 +321,7 @@ const GameModel = { ) && ( !obj.rematchOffer || !!(obj.rematchOffer.match(/^[wbn]$/)) ) && ( - // TODO: check if commas are still used (probably not) - !obj.fen || !!(obj.fen.match(/^[a-zA-Z0-9,. /-]*$/)) + !obj.fen || !!(obj.fen.match(/^[a-zA-Z0-9,.:{}\[\]" /-]*$/)) ) && ( !obj.score || !!(obj.score.match(/^[012?*\/-]+$/)) ) && ( @@ -510,6 +509,7 @@ const GameModel = { } // Set score if lost on time and >= 2 moves: else if ( + g.score == '*' && !!movesGroups[g.id] && movesGroups[g.id].nbMoves >= 2 && tsNow - movesGroups[g.id].lastMaj >