fix: Encode usernames in booking url to UTF-8 to prevent 500 throws (#19475)
* fix: Encode usernames in booking url to UTF-8 to prevent throws * add dynamic booking page e2e * add 1 more test
This commit is contained in:
1 parent
d1a9af84b2
commit
acf270bc61
4 files changed
+66
-14
No files matched your search
@@ -106,7 +106,7 @@ export const getServerSideProps: GetServerSideProps<UserPageProps> = async (cont
|
||||
log.debug(safeStringify({ usersInOrgContext, isValidOrgDomain, currentOrgDomain, isDynamicGroup }));
|
||||
|
||||
if (isDynamicGroup) {
|
||||
const destinationUrl = `/${usernameList.join("+")}/dynamic`;
|
||||
const destinationUrl = encodeURI(`/${usernameList.join("+")}/dynamic`);
|
||||
|
||||
// EXAMPLE - context.params: { orgSlug: 'acme', user: 'member0+owner1' }
|
||||
// EXAMPLE - context.query: { redirect: 'undefined', orgRedirection: 'undefined', user: 'member0+owner1' }
|
||||
@@ -166,7 +166,7 @@ export const getServerSideProps: GetServerSideProps<UserPageProps> = async (cont
|
||||
return {
|
||||
redirect: {
|
||||
permanent: false,
|
||||
destination: `${urlDestination}?${urlQuery}`,
|
||||
destination: `${encodeURI(urlDestination)}?${urlQuery}`,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user