Skip to content

Commit ec4a01b

Browse files
committed
feat: upgrade to body-parser@1.20.3 (#5926)
PR-URL: #5926
1 parent 54271f6 commit ec4a01b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

History.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
unreleased
22
==========
3-
3+
* deps: body-parser@0.6.0
4+
* add `depth` option to customize the depth level in the parser
5+
* IMPORTANT: The default `depth` level for parsing URL-encoded data is now `32` (previously was `Infinity`)
6+
* Remove link renderization in html while using `res.redirect`
47
* deps: path-to-regexp@0.1.10
58
- Adds support for named matching groups in the routes using a regex
69
- Adds backtracking protection to parameters without regexes defined

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dependencies": {
3131
"accepts": "~1.3.8",
3232
"array-flatten": "1.1.1",
33-
"body-parser": "1.20.2",
33+
"body-parser": "1.20.3",
3434
"content-disposition": "0.5.4",
3535
"content-type": "~1.0.4",
3636
"cookie": "0.6.0",

test/express.urlencoded.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('express.urlencoded()', function () {
212212
it('should parse deep object', function (done) {
213213
var str = 'foo'
214214

215-
for (var i = 0; i < 500; i++) {
215+
for (var i = 0; i < 32; i++) {
216216
str += '[p]'
217217
}
218218

@@ -230,7 +230,7 @@ describe('express.urlencoded()', function () {
230230
var depth = 0
231231
var ref = obj.foo
232232
while ((ref = ref.p)) { depth++ }
233-
assert.strictEqual(depth, 500)
233+
assert.strictEqual(depth, 32)
234234
})
235235
.expect(200, done)
236236
})

0 commit comments

Comments
 (0)