From f6006773671630950fd602ff67260fab947c8963 Mon Sep 17 00:00:00 2001 From: Robert Thomas <31854736+wolveix@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:53:58 +0100 Subject: [PATCH] Correct regex matches --- pkg/scanner/requests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/scanner/requests.go b/pkg/scanner/requests.go index 42884b4..4c1a3ca 100644 --- a/pkg/scanner/requests.go +++ b/pkg/scanner/requests.go @@ -16,8 +16,8 @@ const ( var ( BIMIPrefix = DefaultBIMIPrefix DKIMPrefix = DefaultDKIMPrefix - DMARCPrefix = regexp.MustCompile(`^\s*v\s*=\s*DMARC1`) // Matches v=DMARC1 with whitespace (RFC7489). - SPFPrefix = regexp.MustCompile(`^\s*v\s*=\s*(?i)spf1`) + DMARCPrefix = regexp.MustCompile(`^v\s*=\s*DMARC1`) // Matches v=DMARC1 with whitespace (RFC7489). + SPFPrefix = regexp.MustCompile(`^v=(?i)spf1`) // knownDkimSelectors is a list of known DKIM selectors. knownDkimSelectors = []string{