mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
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 <philip.molares@udo.edu>
This commit is contained in:
parent
de8bad13cf
commit
96747b6d68
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,8 @@ const schema = Joi.object({
|
||||||
.label('HD_FORBIDDEN_NOTE_IDS'),
|
.label('HD_FORBIDDEN_NOTE_IDS'),
|
||||||
maxDocumentLength: Joi.number()
|
maxDocumentLength: Joi.number()
|
||||||
.default(100000)
|
.default(100000)
|
||||||
|
.positive()
|
||||||
|
.integer()
|
||||||
.optional()
|
.optional()
|
||||||
.label('HD_MAX_DOCUMENT_LENGTH'),
|
.label('HD_MAX_DOCUMENT_LENGTH'),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue