fix: preserve array query params in redirect URL serialization#28688
fix: preserve array query params in redirect URL serialization#28688Akash504-ai wants to merge 5 commits intocalcom:mainfrom
Conversation
…x/query-params-serialization
|
All checks look good except PR Update / required ( it seems unrelated to this change). Ready for review. |
There was a problem hiding this comment.
this is dead code now, we can remove this import { encode } from "node:querystring";
sahitya-chandra
left a comment
There was a problem hiding this comment.
PR looks fine, but can you still add a before and after video of changes
|
Before: After: Example.Domain.-.Brave.2026-04-01.15-50-40.mp4 |
|
Ready for review. All feedback addressed and branch updated. |
sahitya-chandra
left a comment
There was a problem hiding this comment.
a video of issue being reproduced on locally running cal.com, not on example.com
|
Hi, I tried setting up cal.com locally to reproduce the issue, but I am running into persistent environment/database setup issues (Prisma/Postgres access errors) that seem unrelated to the PR. I have demonstrated the exact root cause and fix using Would that be sufficient, or is there a specific minimal setup or route I should use in the app to reproduce this without full local setup? |
What does this PR do?
Fixes incorrect serialization of query parameters containing array values in redirect logic.
Previously,
context.querywas cast toRecord<string, string>and passed toURLSearchParams, which caused array query params to be flattened (e.g.user=john,doeinstead ofuser=john&user=doe).This PR ensures query params are properly preserved by handling both
stringandstring[]values.How should this be tested?
Open a URL with repeated query params:
/john+doe?user=john&user=doeTrigger a redirect (dynamic group or single event).
Verify the redirected URL:
user=john,doeuser=john&user=doeMandatory Tasks
Checklist