Skip to content

Commit

Permalink
Do not lower case CSRF Secret key
Browse files Browse the repository at this point in the history
When retrieving the existing CSRF Secret as part of the `setup` function, do not call `toLowerCase` on the token key.
Fixes j0lvera#67
  • Loading branch information
tochoromero authored Apr 25, 2023
1 parent f3a9288 commit 68a4ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/get-secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getCookie } from "./get-cookie";
import { IncomingMessage } from "http";

const getSecret = (req: IncomingMessage, tokenKey: string): string => {
return getCookie(req, tokenKey.toLowerCase());
return getCookie(req, tokenKey);
};

export { getSecret };

0 comments on commit 68a4ba1

Please sign in to comment.