Skip to content

cookie: accept and ignore values for 'secure' and 'httponly' - #23265

Closed
bagder wants to merge 5 commits into
masterfrom
bagder/cookie-secure
Closed

bagder wants to merge 5 commits into
masterfrom
bagder/cookie-secure

Conversation

@bagder

@bagder bagder commented Oct 5, 2026

Copy link
Copy Markdown
Member

They are supposed to be plain secure and httponly (without any following equals sign) but with this change, variations with secure=[value] and httponly=[value] are accepted and the value to the right of the equals sign is ignored.

Possibly supported by RFC 6265 section 5.2.5 and 5.2.6.

curl used to accept this format in the past.

Verified in test 31 and 414.

Reported-by: Wonyoung Jung

@bagder bagder added the cookies label Oct 5, 2026
They are supposed to be plain `secure` and `httponly` (without any
following equals sign) but with this change, variations with
`secure=[value]` and `httponly=[value]` are accepted and the value to
the right of the equals sign is ignored.

Possibly supported by RFC 6265 section 5.2.5 and 5.2.6.

curl used to accept this format in the past.

Verified in test 31 and 414.

Reported-by: Wonyoung Jung
@github-actions github-actions Bot added the tests label Oct 5, 2026
@bagder
bagder force-pushed the bagder/cookie-secure branch from 7b3cd4d to 71795a1 Compare October 5, 2026 11:20
@bagder
bagder marked this pull request as ready for review October 5, 2026 11:30
@bagder
bagder requested a balanced review from Copilot October 5, 2026 11:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The parser change matches cookie attribute semantics and both affected behaviors are verified.

Review effort: Balanced
Findings: None

What changed in this PR

Updates cookie parsing to accept values on Secure and HttpOnly attributes while ignoring those values.

Changes:

  • Handles both attributes regardless of an equals separator.
  • Adds coverage for valued Secure and HttpOnly attributes.
File Description
lib/​cookie.c Recognizes valued security attributes.
tests/​data/​test31 Tests valued HttpOnly.
tests/​data/​test414 Tests valued Secure.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bagder

bagder commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

The AM wolfSSL-all CI run now ends with:

TESTFAIL: number of tests run (1799) was below the minimum of: 1800

... which seems unrelated to this PR!

@bagder bagder closed this in 52fc4ac Oct 5, 2026
@bagder
bagder deleted the bagder/cookie-secure branch October 5, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants