Skip to content

Commit

Permalink
http: don't double-decode session cookie (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn authored Nov 13, 2024
1 parent 9e74cf5 commit 695fa2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http/preprocessors.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const authHandler = ({ Sessions, Users, Auth }, context) => {

// actually try to authenticate with it. no Problem on failure. short circuit
// out if we have a GET or HEAD request.
const maybeSession = authBySessionToken(decodeURIComponent(token));
const maybeSession = authBySessionToken(token);
if ((context.method === 'GET') || (context.method === 'HEAD')) return maybeSession;

// if non-GET run authentication as usual but we'll have to check CSRF afterwards.
Expand Down

0 comments on commit 695fa2c

Please sign in to comment.