check if ChangesetRequest granularity is a number (#2796)

This commit is contained in:
webzwo0i 2015-10-09 14:55:19 +02:00
parent a09044a6f3
commit 31f7c7e0f2
1 changed files with 5 additions and 0 deletions

View File

@ -1365,6 +1365,11 @@ function handleChangesetRequest(client, message)
messageLogger.warn("Dropped message, changeset request has no granularity!");
return;
}
if(Number(message.data.granularity) !== message.data.granularity || message.data.granularity % 1 !== 0)
{
messageLogger.warn("Dropped message, changeset request granularity is not an integer!");
return;
}
if(message.data.start == null)
{
messageLogger.warn("Dropped message, changeset request has no start!");