Skip to content
Myr

deps: body-parser@1.20.2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 506fbd6 · Browse files · 3 files+13 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+13 added−5 removed

  • tests:+4 added−4 removed
  • other:+9 added−1 removed

3 files+13 added−5 removed

modified:test/express.json.js+4 added-4 removed
260 unmodified lines
261 request(this.app)262 .post('/')263 .set('Content-Type', 'application/json')264 .send('true')265 .expect(400, '[entity.parse.failed] ' + parseError('#rue').replace('#', 't'), done)265 .expect(400, '[entity.parse.failed] ' + parseError('#rue').replace(/#/g, 't'), done)266 })267 })268269 describe('when false', function () {
19 unmodified lines
289 request(this.app)290 .post('/')291 .set('Content-Type', 'application/json')292 .send('true')293 .expect(400, '[entity.parse.failed] ' + parseError('#rue').replace('#', 't'), done)293 .expect(400, '[entity.parse.failed] ' + parseError('#rue').replace(/#/g, 't'), done)294 })295296 it('should not parse primitives with leading whitespaces', function (done) {297 request(this.app)298 .post('/')299 .set('Content-Type', 'application/json')300 .send(' true')301 .expect(400, '[entity.parse.failed] ' + parseError(' #rue').replace('#', 't'), done)301 .expect(400, '[entity.parse.failed] ' + parseError(' #rue').replace(/#/g, 't'), done)302 })303304 it('should allow leading whitespaces in JSON', function (done) {305 request(this.app)
9 unmodified lines
315 .set('Content-Type', 'application/json')316 .set('X-Error-Property', 'stack')317 .send('true')318 .expect(400)319 .expect(shouldContainInBody(parseError('#rue').replace('#', 't')))319 .expect(shouldContainInBody(parseError('#rue').replace(/#/g, 't')))320 .end(done)321 })322 })323 })
467 unmodified lines
modified:History.md+8 added
1unreleased2==========34 * deps: body-parser@1.20.25 - Fix strict json error message on Node.js 19+6 - deps: content-type@~1.0.57 - deps: raw-body@2.5.2894.18.2 / 2022-10-0810===================1112 * Fix regression routing a large stack in a single route
3584 unmodified lines
modified:package.json+1 added-1 removed