-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardNeeds review from a maintainer before moving forwardBugError or unexpected behaviorsError or unexpected behaviors
Description
p5.js version
No response
What is your operating system?
None
Web browser and version
No response
Actual Behavior
Session cookie is set with secure: false hardcoded in server/server.js. Session cookies can be sent over HTTP, increasing session hijacking risk if the app is (or is ever) served over HTTP in production.
Location: server/server.js line 94
Expected Behavior
In production (NODE_ENV === 'production'), the session cookie should have secure: true so it is only sent over HTTPS.
Steps to reproduce
- Open
server/server.jsand find the sessioncookieconfig. - Confirm
secure: falseis set with no environment-based override. - In production over HTTPS, cookie could still be sent over HTTP if there is any downgrade or misconfiguration.
Snippet:
// server.js
cookie: {
httpOnly: true,
secure: false, // should be true in production
maxAge: 1000 * 60 * 60 * 24 * 28
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardNeeds review from a maintainer before moving forwardBugError or unexpected behaviorsError or unexpected behaviors