From 96747b6d68cc2245fca8ff9b2f87a11e21ba4aaa Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sat, 5 Mar 2022 00:26:04 +0100 Subject: [PATCH] fix: use joi positive and integer validators on HD_MAX_DOCUMENT_LENGTH validate HD_MAX_DOCUMENT_LENGTH with the positive and integer validators of Joi. See also: - https://joi.dev/api/#numberpositive - https://joi.dev/api/#numberinteger Signed-off-by: Philip Molares --- src/config/note.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config/note.config.ts b/src/config/note.config.ts index 9217bcff5..9df716d18 100644 --- a/src/config/note.config.ts +++ b/src/config/note.config.ts @@ -21,6 +21,8 @@ const schema = Joi.object({ .label('HD_FORBIDDEN_NOTE_IDS'), maxDocumentLength: Joi.number() .default(100000) + .positive() + .integer() .optional() .label('HD_MAX_DOCUMENT_LENGTH'), });