Skip to content

Add note about cookie protection - #126

Open
vjik wants to merge 5 commits into
masterfrom
cookie-readme
Open

Add note about cookie protection#126
vjik wants to merge 5 commits into
masterfrom
cookie-readme

Conversation

@vjik

@vjik vjik commented Aug 16, 2026

Copy link
Copy Markdown
Member
Q A
Is bugfix?
New feature?
Breaks BC?
Fix #125

@vjik vjik changed the title Cookie readme Add note about cookie protection Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.65%. Comparing base (53f13da) to head (add18f2).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #126   +/-   ##
=========================================
  Coverage     99.65%   99.65%           
  Complexity      110      110           
=========================================
  Files            15       15           
  Lines           290      290           
=========================================
  Hits            289      289           
  Misses            1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vjik
vjik requested a review from a team August 16, 2026 06:27
@vjik vjik added the status:code review The pull request needs review. label Aug 16, 2026

@samdark samdark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need some docs fixes.

Comment thread README.md
validate it and login the user automatically.

> [!note]
> The auto-login cookie value isn't protected against tampering by this package. This isn't only about

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it already mentioned in "Preventing the substitution of cookies" which mentions order which is critical for it to work?

*
* The auto-login cookie value isn't protected against tampering by this package. This isn't only about
* the end user editing their own cookie — anyone who steals the cookie value can modify it too, e.g. to
* remove its expiration. Use {@see CookieMiddleware} to sign or encrypt it if you want to prevent that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to refer to README since order of middlware is critical for it to work proeprly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CookieLogin: client can bypass remember-me TTL by setting expires=0

2 participants