diff --git a/dist/main.js b/dist/main.js index 634f569..913db07 100644 --- a/dist/main.js +++ b/dist/main.js @@ -5736,6 +5736,13 @@ var require_body = __commonJS({ var { isUint8Array, isArrayBuffer } = require("util/types"); var { File: UndiciFile } = require_file(); var { parseMIMEType, serializeAMimeType } = require_dataURL(); + var random; + try { + const crypto4 = require("node:crypto"); + random = (max) => crypto4.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } var ReadableStream = globalThis.ReadableStream; var File = NativeFile ?? UndiciFile; var textEncoder = new TextEncoder(); @@ -5778,7 +5785,7 @@ var require_body = __commonJS({ } else if (ArrayBuffer.isView(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 Content-Disposition: form-data`; const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); diff --git a/package-lock.json b/package-lock.json index 5614053..8828fc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1672,9 +1672,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" },