Skip to content

Add the 'cookieSecure' parameter to enable 'CookieLogin' to set a cookie when an HTTP request is made - #139

Open
klsoft-web wants to merge 2 commits into
yiisoft:masterfrom
klsoft-web:configure-cookie-secure
Open

klsoft-web wants to merge 2 commits into
yiisoft:masterfrom
klsoft-web:configure-cookie-secure

Conversation

@klsoft-web

Copy link
Copy Markdown
Contributor

Add the 'cookieSecure' parameter to enable 'CookieLogin' to set a cookie when an HTTP request is made

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #135

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.68%. Comparing base (1951c80) to head (7dc83fa).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #139   +/-   ##
=========================================
  Coverage     99.67%   99.68%           
  Complexity      122      122           
=========================================
  Files            15       15           
  Lines           311      313    +2     
=========================================
+ Hits            310      312    +2     
  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.

Comment thread config/params.php Outdated
Comment thread CHANGELOG.md
- Enh #127: Bump `yiisoft/auth` version to `^3.3.0`, and fix deprecated classes usage (@klsoft-web, @vjik)
- Enh #132: Bump `yiisoft/session` version to `^3.0.2` (@vjik)
- New #126: Add optional HMAC signing of the auto-login cookie value via `CookieLogin` signature key (@vjik)
- Bug #135: Add the `secureCookie` parameter to enable `CookieLogin` to set a cookie when an HTTP request is made (@klsoft-web)

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.

Suggested change
- Bug #135: Add the `secureCookie` parameter to enable `CookieLogin` to set a cookie when an HTTP request is made (@klsoft-web)
- Enh #135: Add the `secureCookie` parameter to enable `CookieLogin` to set a cookie when an HTTP request is made (@klsoft-web)

Comment thread README.md
```

> If you want the cookie to be a session cookie, change the duration to `null`.
> To enable a cookie to be set when an HTTP request is made, change the `secureCookie` to `false`.

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 we need to warn about consequences here. Something like:

With secureCookie turned off, it travels in cleartext and can be captured and replayed for the full duration of cookie lifetime (5 days by default).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants