internetstandards / Internet.nl

Internet standards compliance test suite
https://internet.nl
164 stars 36 forks source link

SPF / DMARC case sensitivity #1400

Open bwbroersma opened 2 months ago

bwbroersma commented 2 months ago

These are case sensitive regular expressions: https://github.com/internetstandards/Internet.nl/blob/f18cb79e021cd4505cef43e522676e2f8990db0f/checks/__init__.py#L5-L7

While the only case sensitive part is DMARC1, the rest is case insensitive according to the ABNF grammar and the related RFC 5234 - Augmented BNF for Syntax Specifications: ABNF - page 5.

Related:

gthess commented 2 months ago

They are but they are used on already parsed records IIRC, so case sensitivity does not matter at that point.

gthess commented 2 months ago

I mean if they turn into case insensitive regular expressions it should work.

bwbroersma commented 2 months ago

Could indeed be converted to case insensitive regular expressions to fix this part of the regex parsing.