mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
fix: accept request body only if string
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
e7327afbae
commit
d856c0acb5
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ exports.createFromPOST = function (req, res, next) {
|
|||
let body = ''
|
||||
if (req.body && req.body.length > config.documentMaxLength) {
|
||||
return errors.errorTooLong(res)
|
||||
} else if (req.body) {
|
||||
} else if (typeof req.body === 'string') {
|
||||
body = req.body
|
||||
}
|
||||
body = body.replace(/[\r]/g, '')
|
||||
|
|
Loading…
Reference in a new issue