From 140c5ea762e1a2be830ca8428d936fb48671ba00 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2025 13:22:06 +0000 Subject: [PATCH] Update checked-in dependencies --- node_modules/.package-lock.json | 7 ++++--- node_modules/undici/lib/fetch/body.js | 10 +++++++++- node_modules/undici/package.json | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index a9ab271a4b..3c008471ec 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -7568,9 +7568,10 @@ } }, "node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", + "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", + "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" }, diff --git a/node_modules/undici/lib/fetch/body.js b/node_modules/undici/lib/fetch/body.js index fd8481b796..4afcfdfbcd 100644 --- a/node_modules/undici/lib/fetch/body.js +++ b/node_modules/undici/lib/fetch/body.js @@ -22,6 +22,14 @@ const { isUint8Array, isArrayBuffer } = require('util/types') const { File: UndiciFile } = require('./file') const { parseMIMEType, serializeAMimeType } = require('./dataURL') +let random +try { + const crypto = require('node:crypto') + random = (max) => crypto.randomInt(0, max) +} catch { + random = (max) => Math.floor(Math.random(max)) +} + let ReadableStream = globalThis.ReadableStream /** @type {globalThis['File']} */ @@ -107,7 +115,7 @@ function extractBody (object, keepalive = false) { // Set source to a copy of the bytes held by object. source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` const prefix = `--${boundary}\r\nContent-Disposition: form-data` /*! formdata-polyfill. MIT License. Jimmy Wärting */ diff --git a/node_modules/undici/package.json b/node_modules/undici/package.json index 65a2d9833c..0c6b71e175 100644 --- a/node_modules/undici/package.json +++ b/node_modules/undici/package.json @@ -1,6 +1,6 @@ { "name": "undici", - "version": "5.28.4", + "version": "5.28.5", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": {