Skip to content

Commit 2b30e05

Browse files
Merge pull request #109 from step-security/yarn-audit-fix
fix: Security updates
2 parents f348cde + e6a9100 commit 2b30e05

2 files changed

Lines changed: 34 additions & 34 deletions

File tree

dist/index.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39789,7 +39789,7 @@ module.exports = {
3978939789

3979039790

3979139791
const { parseSetCookie } = __nccwpck_require__(4408)
39792-
const { stringify, getHeadersList } = __nccwpck_require__(3121)
39792+
const { stringify } = __nccwpck_require__(3121)
3979339793
const { webidl } = __nccwpck_require__(1744)
3979439794
const { Headers } = __nccwpck_require__(554)
3979539795

@@ -39865,14 +39865,13 @@ function getSetCookies (headers) {
3986539865

3986639866
webidl.brandCheck(headers, Headers, { strict: false })
3986739867

39868-
const cookies = getHeadersList(headers).cookies
39868+
const cookies = headers.getSetCookie()
3986939869

3987039870
if (!cookies) {
3987139871
return []
3987239872
}
3987339873

39874-
// In older versions of undici, cookies is a list of name:value.
39875-
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
39874+
return cookies.map((pair) => parseSetCookie(pair))
3987639875
}
3987739876

3987839877
/**
@@ -40300,14 +40299,15 @@ module.exports = {
4030040299
/***/ }),
4030140300

4030240301
/***/ 3121:
40303-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
40302+
/***/ ((module) => {
4030440303

4030540304
"use strict";
4030640305

4030740306

40308-
const assert = __nccwpck_require__(9491)
40309-
const { kHeadersList } = __nccwpck_require__(2785)
40310-
40307+
/**
40308+
* @param {string} value
40309+
* @returns {boolean}
40310+
*/
4031140311
function isCTLExcludingHtab (value) {
4031240312
if (value.length === 0) {
4031340313
return false
@@ -40568,31 +40568,13 @@ function stringify (cookie) {
4056840568
return out.join('; ')
4056940569
}
4057040570

40571-
let kHeadersListNode
40572-
40573-
function getHeadersList (headers) {
40574-
if (headers[kHeadersList]) {
40575-
return headers[kHeadersList]
40576-
}
40577-
40578-
if (!kHeadersListNode) {
40579-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
40580-
(symbol) => symbol.description === 'headers list'
40581-
)
40582-
40583-
assert(kHeadersListNode, 'Headers cannot be parsed')
40584-
}
40585-
40586-
const headersList = headers[kHeadersListNode]
40587-
assert(headersList)
40588-
40589-
return headersList
40590-
}
40591-
4059240571
module.exports = {
4059340572
isCTLExcludingHtab,
40594-
stringify,
40595-
getHeadersList
40573+
validateCookieName,
40574+
validateCookiePath,
40575+
validateCookieValue,
40576+
toIMFDate,
40577+
stringify
4059640578
}
4059740579

4059840580

@@ -44596,6 +44578,7 @@ const {
4459644578
isValidHeaderName,
4459744579
isValidHeaderValue
4459844580
} = __nccwpck_require__(2538)
44581+
const util = __nccwpck_require__(3837)
4459944582
const { webidl } = __nccwpck_require__(1744)
4460044583
const assert = __nccwpck_require__(9491)
4460144584

@@ -45149,6 +45132,9 @@ Object.defineProperties(Headers.prototype, {
4514945132
[Symbol.toStringTag]: {
4515045133
value: 'Headers',
4515145134
configurable: true
45135+
},
45136+
[util.inspect.custom]: {
45137+
enumerable: false
4515245138
}
4515345139
})
4515445140

@@ -54325,6 +54311,20 @@ class Pool extends PoolBase {
5432554311
? { ...options.interceptors }
5432654312
: undefined
5432754313
this[kFactory] = factory
54314+
54315+
this.on('connectionError', (origin, targets, error) => {
54316+
// If a connection error occurs, we remove the client from the pool,
54317+
// and emit a connectionError event. They will not be re-used.
54318+
// Fixes https://github.com/nodejs/undici/issues/3895
54319+
for (const target of targets) {
54320+
// Do not use kRemoveClient here, as it will close the client,
54321+
// but the client cannot be closed in this state.
54322+
const idx = this[kClients].indexOf(target)
54323+
if (idx !== -1) {
54324+
this[kClients].splice(idx, 1)
54325+
}
54326+
}
54327+
})
5432854328
}
5432954329

5433054330
[kGetDispatcher] () {

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4402,9 +4402,9 @@ undici-types@~5.26.4:
44024402
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
44034403

44044404
undici@^5.25.4:
4405-
version "5.28.5"
4406-
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.5.tgz#b2b94b6bf8f1d919bc5a6f31f2c01deb02e54d4b"
4407-
integrity "sha1-srlLa/jx2Rm8Wm8x8sAd6wLlTUs= sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA=="
4405+
version "5.29.0"
4406+
resolved "https://registry.yarnpkg.com/undici/-/undici-5.29.0.tgz#419595449ae3f2cdcba3580a2e8903399bd1f5a3"
4407+
integrity "sha1-QZWVRJrj8s3Lo1gKLokDOZvR9aM= sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg=="
44084408
dependencies:
44094409
"@fastify/busboy" "^2.0.0"
44104410

0 commit comments

Comments
 (0)