ai 6.0.117 → 6.0.118
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 +12 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +4 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +4 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/util/download/download.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 6.0.118
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 64ac0fd: fix(security): validate redirect targets in download functions to prevent SSRF bypass
|
|
8
|
+
|
|
9
|
+
Both `downloadBlob` and `download` now validate the final URL after following HTTP redirects, preventing attackers from bypassing SSRF protections via open redirects to internal/private addresses.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [64ac0fd]
|
|
12
|
+
- @ai-sdk/provider-utils@4.0.20
|
|
13
|
+
- @ai-sdk/gateway@3.0.68
|
|
14
|
+
|
|
3
15
|
## 6.0.117
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1230,7 +1230,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
|
1230
1230
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
1231
1231
|
|
|
1232
1232
|
// src/version.ts
|
|
1233
|
-
var VERSION = true ? "6.0.
|
|
1233
|
+
var VERSION = true ? "6.0.118" : "0.0.0-test";
|
|
1234
1234
|
|
|
1235
1235
|
// src/util/download/download.ts
|
|
1236
1236
|
var download = async ({
|
|
@@ -1250,6 +1250,9 @@ var download = async ({
|
|
|
1250
1250
|
),
|
|
1251
1251
|
signal: abortSignal
|
|
1252
1252
|
});
|
|
1253
|
+
if (response.redirected) {
|
|
1254
|
+
(0, import_provider_utils3.validateDownloadUrl)(response.url);
|
|
1255
|
+
}
|
|
1253
1256
|
if (!response.ok) {
|
|
1254
1257
|
throw new import_provider_utils3.DownloadError({
|
|
1255
1258
|
url: urlText,
|