@ai-sdk/provider-utils 4.0.19 → 4.0.21

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.
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/test/index.ts
21
- var test_exports = {};
22
- __export(test_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  convertArrayToAsyncIterable: () => convertArrayToAsyncIterable,
24
24
  convertArrayToReadableStream: () => convertArrayToReadableStream,
25
25
  convertAsyncIterableToArray: () => convertAsyncIterableToArray,
@@ -28,7 +28,7 @@ __export(test_exports, {
28
28
  isNodeVersion: () => isNodeVersion,
29
29
  mockId: () => mockId
30
30
  });
31
- module.exports = __toCommonJS(test_exports);
31
+ module.exports = __toCommonJS(index_exports);
32
32
 
33
33
  // src/test/convert-array-to-async-iterable.ts
34
34
  function convertArrayToAsyncIterable(values) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider-utils",
3
- "version": "4.0.19",
3
+ "version": "4.0.21",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -26,6 +26,11 @@ export async function downloadBlob(
26
26
  signal: options?.abortSignal,
27
27
  });
28
28
 
29
+ // Validate final URL after redirects to prevent SSRF via open redirect
30
+ if (response.redirected) {
31
+ validateDownloadUrl(response.url);
32
+ }
33
+
29
34
  if (!response.ok) {
30
35
  throw new DownloadError({
31
36
  url,