From 7fcde11fa0b232537de606e44c0af68b122daed2 Mon Sep 17 00:00:00 2001 From: Elliot Lintz <45725915+Elliot67@users.noreply.github.com> Date: Mon, 24 Apr 2023 17:19:26 +0200 Subject: [PATCH] fix: prevent floating point number in image sizes (#1935) --- src/collections/config/schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/collections/config/schema.ts b/src/collections/config/schema.ts index 107fa66996..d72e140b83 100644 --- a/src/collections/config/schema.ts +++ b/src/collections/config/schema.ts @@ -159,8 +159,8 @@ const collectionSchema = joi.object().keys({ imageSizes: joi.array().items( joi.object().keys({ name: joi.string(), - width: joi.number().allow(null), - height: joi.number().allow(null), + width: joi.number().integer().allow(null), + height: joi.number().integer().allow(null), crop: joi.string(), // TODO: add further specificity with joi.xor }).unknown(), ),