chore: CSRF protect forgot-password functionality (#22361)
* chore: CSRF protect forgot-password functionality * feat: implement conditional sameSite cookie setting for CSRF tokens - Use WEBAPP_URL to determine secure cookie settings - Set sameSite to 'none' for HTTPS environments to support cross-origin scenarios - Fall back to 'lax' for HTTP development environments - Follows patterns from PRs #23439 and #23556 Co-Authored-By: [email protected] <[email protected]> * update * change * NIT * minor --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: unknown <[email protected]> Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
6 files changed
+187
-111
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import type { GetServerSidePropsContext } from "next";
|
||||
import { getCsrfToken } from "next-auth/react";
|
||||
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
@@ -28,7 +27,6 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
|
||||
props: {
|
||||
isRequestExpired: !resetPasswordRequest,
|
||||
requestId: id,
|
||||
csrfToken: await getCsrfToken({ req: context.req }),
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user