Merged
Conversation
🦋 Changeset detectedLatest commit: e2c8d18 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-nsotvrlsp.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-nsotvrlsp.vercel.sh/tarballs/vercel.tgz"
}
}
} |
Contributor
🧪 Unit Test StrategyComparing: Strategy: Affected packages only ✅ Only testing packages that have been modified or depend on modified packages. Affected packages - 11 (27%)
Unaffected packages - 30 (73%)
Results
This comment is automatically generated based on the affected testing strategy |
QuiiBz
requested changes
Jan 27, 2026
Co-authored-by: Tom Lienard <tom.lienrd@gmail.com>
QuiiBz
approved these changes
Jan 27, 2026
Merged
brookemosby
pushed a commit
that referenced
this pull request
Jan 27, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @vercel/functions@3.4.0 ### Minor Changes - Fix cache tags to be URL encoded before being sent to the cache API. Tags containing special characters (spaces, commas, ampersands, etc.) are now properly encoded using `encodeURIComponent`. This ([#14749](#14749)) ensures tags like `"my tag"` or `"category,item"` are correctly handled when setting cache entries or expiring tags. ## vercel@50.7.1 ### Patch Changes - Prebuilt Bulk Redirects ([#14627](#14627)) - Updated dependencies \[]: - @vercel/node@5.5.28 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
styfle
added a commit
that referenced
this pull request
Feb 24, 2026
Reverts #14749 since this caused a regression when using `:` and other characters in tags. The expected behavior is that commas split into multiple tags. <!-- VADE_RISK_START --> > [!WARNING] > High Risk Change > > Revert removes URL encoding of cache tags, which could allow special characters like commas to be interpreted as tag delimiters, potentially affecting cache invalidation behavior. > > - Removes encodeURIComponent from cache tags in set() and expireTag() > - Tags with special characters (commas, spaces, ampersands) now passed through unencoded > - Removes associated URL encoding tests > > <sup>Risk assessment for [commit 83d1d76](https://github.com/vercel/vercel/commit/83d1d7601b8ecaf69a01e90cdd612dcd5aeaea30).</sup> <!-- VADE_RISK_END -->
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.

TL;DR
URL encode cache tags to properly handle special characters.
What changed?
encodeURIComponentbefore they're sent to the cache APIencodeTags,encodeTag, andencodeOptionsto handle encodingHow to test?
Create cache entries with tags containing special characters:
Expire tags with special characters:
Verify that the tags are properly encoded when sent to the cache API
Why make this change?
Previously, cache tags containing special characters (spaces, commas, ampersands, etc.) were not properly handled when setting cache entries or expiring tags. This could lead to unexpected behavior when using tags like
"my tag"or"category,item". By URL encoding the tags, we ensure they are correctly processed by the cache API, improving reliability and preventing potential issues with tag-based cache operations.