Skip to content

Conversation

@m-sanders
Copy link

@m-sanders m-sanders commented Dec 4, 2025

Redis handler mutated the original cacheHandlerValue object Next.js uses for responses. When parseBuffersToStrings() converted Buffers to base64, Next.js sent the mutated object to users. We shallow clone value object before mutation to isolate changes from Next.js's reference.

How was this tested?

Manually

$ npm run build && npm run start
$ redis-cli -p 6379 -n 1 -e flushdb
$ curl http://localhost:3000/manifest.webmanifest
{"name":"Next.js App","short_name":"Next.js App","description":"Next.js App","start_url":"/","display":"standalone","background_color":"#fff","theme_color":"#fff","icons":[{"src":"/favicon.ico","sizes":"any","type":"image/x-icon"}]}%

@m-sanders m-sanders marked this pull request as ready for review December 4, 2025 15:41
@m-sanders m-sanders marked this pull request as draft December 4, 2025 15:42
@m-sanders m-sanders marked this pull request as ready for review December 4, 2025 15:45
@m-sanders m-sanders changed the base branch from next16 to master December 5, 2025 12:53
Redis handler mutated the original `cacheHandlerValue` object Next.js uses for responses. When `parseBuffersToStrings()` converted Buffers to base64, Next.js sent the mutated object to users. So we clone value object before mutation to isolate changes from Next.js's reference.
@m-sanders m-sanders force-pushed the next16-base64-fs-fallbacks branch from ec7f298 to a3599bb Compare December 5, 2025 12:54
@m-sanders
Copy link
Author

@AyronK this is also a bug in Next.js 15.x. Can we get this released please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant