ai 5.0.203 → 5.0.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +2 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +3 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 5.0.205
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [5ed46cd]
|
|
8
|
+
- @ai-sdk/gateway@2.0.104
|
|
9
|
+
|
|
10
|
+
## 5.0.204
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 9169261: fix(provider-utils): cancel response body on download rejection to prevent socket leak
|
|
15
|
+
|
|
16
|
+
When a download was rejected early — because the `Content-Length` header exceeded the size limit, the response status was not ok, or a redirect resolved to a blocked URL — the fetch response body was left unconsumed and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP socket open instead of returning it to the connection pool, allowing an attacker-controlled origin to exhaust file descriptors and cause a denial of service. The body is now cancelled on all early-rejection paths in `readResponseWithSizeLimit` and `download`, and `fetchWithValidatedRedirects` cancels each redirect hop's body before following or rejecting the next hop.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [dd9349d]
|
|
19
|
+
- Updated dependencies [9169261]
|
|
20
|
+
- @ai-sdk/gateway@2.0.103
|
|
21
|
+
- @ai-sdk/provider-utils@3.0.27
|
|
22
|
+
|
|
3
23
|
## 5.0.203
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -778,7 +778,7 @@ function detectMediaType({
|
|
|
778
778
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
779
779
|
|
|
780
780
|
// src/version.ts
|
|
781
|
-
var VERSION = true ? "5.0.
|
|
781
|
+
var VERSION = true ? "5.0.205" : "0.0.0-test";
|
|
782
782
|
|
|
783
783
|
// src/util/download/download.ts
|
|
784
784
|
var download = async ({
|
|
@@ -800,6 +800,7 @@ var download = async ({
|
|
|
800
800
|
abortSignal
|
|
801
801
|
});
|
|
802
802
|
if (!response.ok) {
|
|
803
|
+
await (0, import_provider_utils2.cancelResponseBody)(response);
|
|
803
804
|
throw new import_provider_utils2.DownloadError({
|
|
804
805
|
url: urlText,
|
|
805
806
|
statusCode: response.status,
|