Skip to content

test: add M7 header escaping conformance#16

Merged
emmajam merged 5 commits into
mainfrom
ejh/add-m7-format-escaping-clean
Jun 18, 2026
Merged

test: add M7 header escaping conformance#16
emmajam merged 5 commits into
mainfrom
ejh/add-m7-format-escaping-clean

Conversation

@emmajam

@emmajam emmajam commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Add M7 WWW-Authenticate vectors for escaped quote formatting, escaped backslashes, and CRLF format rejection.
  • Allow vector format tests to expect adapter failures.
  • Use the strict mpp-go challenge formatter in the Go adapter so CRLF rejection is exercised.

Blocked on mpp-java release.

@mablr mablr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sgtm, just a small remark about a regression risk.

Comment on lines +514 to +516
if (value.indexOf('\r') >= 0 || value.indexOf('\n') >= 0) {
throw new IllegalArgumentException("Header values must not contain CR or LF");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This CRLF guard seems to be only exercised when formatChallenge takes the opaque-present manual formatting path. The new CRLF vector omits opaque, so Java returns through challenge.toWwwAuthenticate() and CI would still pass if this quote() guard regressed.

@mablr mablr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sgtm

@emmajam emmajam merged commit 14acb19 into main Jun 18, 2026
18 checks passed
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