jaredhanson / jaredhanson/connect-flash
Req.flash() automatic set session when it's not required to do so.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
When in read-only scenario. Which flash is not yet existed. running `req.flash('name')` will set `req.session.flash` to `{}` which will prevent caching.
Solution:
- Make sure `req.session.flash` is set only when `req.flash()` have 2 args.
- Make sure fetching flash data return empty array if `req.session.flash` does not exists
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the req.flash() implementation and its handling of req.session.flash. Verify the read-only one-argument call does not create session flash state, while the two-argument call still sets it. Confirm that fetching flash data without an existing req.session.flash returns an empty array, using the project's existing tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100