Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
fix: new req body length validation
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Mar 31, 2022
1 parent 7ff62ba commit e3f7833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ app.all("*", (req, res, next) => {

// in case there's a valid body defined for the request
// then sets the body in the options
if (req.body && Buffer.isBuffer(req.body)) {
if (req.body && Buffer.isBuffer(req.body) && req.body.length > 0) {
options.body = req.body;
}

Expand Down

0 comments on commit e3f7833

Please sign in to comment.