aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-06-15 13:18:05 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-06-15 13:18:05 -0400
commitd79b9cd87057d44e5afd384be4de7e267fd466b6 (patch)
treeb42286ea2c43e59b21a4cf1f5abec4775f658da0
parent02b333607971222849f39bcaeb8ee5a8e2a7074e (diff)
downloadb4-d79b9cd87057d44e5afd384be4de7e267fd466b6.tar.gz
Improve identity matching for DKIM
Sometimes the DKIM record will have the full email address instead of just the @domainname.com part. For those cases, drop the local part so we don't falsely claim domain mismatching during b4-am runs. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 00419be..5a901e9 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1842,8 +1842,11 @@ class LoreAttestorDKIM(LoreAttestor):
self.keysrc = 'DNS'
self.signtime = signtime
self.passing = passing
- self.identity = identity.lstrip('@')
self.errors = errors
+ if identity.find('@') >= 0:
+ self.identity = identity.split('@')[1]
+ else:
+ self.identity = identity
class LoreAttestorPatatt(LoreAttestor):