Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad wrapped DKIM formatted signatures #15

Open
bigio opened this issue Jun 14, 2024 · 2 comments
Open

Bad wrapped DKIM formatted signatures #15

bigio opened this issue Jun 14, 2024 · 2 comments
Assignees

Comments

@bigio
Copy link
Contributor

bigio commented Jun 14, 2024

In some cases, when using DKIM::TextWrap, some spaces are added between keys and values (d=, s=).
Example:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= server0.domain.tld; h=from:message-id:
date:to :subject:mime-version:content-type:content-transfer-encoding; s= main; bh=fd...
@marcbradshaw marcbradshaw self-assigned this Jun 17, 2024
@marcbradshaw
Copy link
Owner

FWS is allowed in those places as defined in section 3.5 of RFC6376, is the a parser that is failing to parse these?

s= The selector subdividing the namespace for the "d=" (domain) tag
      (plain-text; REQUIRED).

      Internationalized selector names MUST be encoded as A-labels, as
      described in [Section 2.3 of [RFC5890]](https://datatracker.ietf.org/doc/html/rfc5890#section-2.3).

      ABNF:

      sig-s-tag    = %x73 [FWS] "=" [FWS] selector

And in the header list

      sig-h-tag       = %x68 [FWS] "=" [FWS] hdr-name
                         *( [FWS] ":" [FWS] hdr-name )

@bigio
Copy link
Contributor Author

bigio commented Jun 19, 2024

I bet I saw a parser that fails with those headers but I cannot find the email that failed atm, I will update the issue if I find it.

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

No branches or pull requests

2 participants