Backport: fix: allow inline data URLs in download validation#13624
Merged
vercel-ai-sdk[bot] merged 3 commits intorelease-v6.0from Apr 2, 2026
Merged
Backport: fix: allow inline data URLs in download validation#13624vercel-ai-sdk[bot] merged 3 commits intorelease-v6.0from
vercel-ai-sdk[bot] merged 3 commits intorelease-v6.0from
Conversation
## Summary - allow `data:` URLs through `validateDownloadUrl` because they are inline content, not network fetches - keep the existing SSRF protections for `http:` and `https:` URLs unchanged - add tests covering both validator acceptance and `download()` support for inline data URLs ## Testing - `pnpm exec prettier --check packages/provider-utils/src/validate-download-url.ts packages/provider-utils/src/validate-download-url.test.ts packages/ai/src/util/download/download.test.ts` - `pnpm install --frozen-lockfile` - Attempted package-local `vitest` runs, but the local workspace currently fails to resolve some internal package entries before reaching these tests under Node `v24.14.0` ## Why This Is Small And Safe This only changes protocol handling for `data:` URLs, which are already inline payloads and do not make outbound network requests. All existing hostname and private-address SSRF checks still apply to real network URLs. Closes #13354. Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
|
Hey @gr2m |
Collaborator
|
sorry I totally missed this one! On it now |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gr2m
approved these changes
Apr 2, 2026
vercel-ai-sdk bot
added a commit
that referenced
this pull request
Apr 2, 2026
This is an automated backport of #13376 to the release-v6.0 branch. FYI @fahe1em1 --------- Co-authored-by: fahe1em1 <131003503+fahe1em1@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
✅ Backport PR created: #14077 |
vercel-ai-sdk bot
added a commit
that referenced
this pull request
Apr 2, 2026
#14077) This is an automated backport of #13624 to the release-v5.0 branch. FYI @vercel-ai-sdk[bot] Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com> Co-authored-by: fahe1em1 <131003503+fahe1em1@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
🚀 Published in:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated backport of #13376 to the release-v6.0 branch. FYI @fahe1em1