[geary] Geary.RFC822.Message: Simplier regex for dkim/dmarc match



commit ef41ed374d1bc74a873d9328751142476a92a377
Author: Cédric Bellegarde <cedric bellegarde adishatz org>
Date:   Fri Jul 8 23:08:24 2022 +0200

    Geary.RFC822.Message: Simplier regex for dkim/dmarc match
    
    Previous regex was working with Google, Microsoft and OpenDKIM but fails
    with Rspamd.
    
    Using a simplier regex is safe enough.

 src/engine/rfc822/rfc822-message-data.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/rfc822/rfc822-message-data.vala b/src/engine/rfc822/rfc822-message-data.vala
index 53cc8ac91..e882d959b 100644
--- a/src/engine/rfc822/rfc822-message-data.vala
+++ b/src/engine/rfc822/rfc822-message-data.vala
@@ -631,13 +631,13 @@ public class Geary.RFC822.AuthenticationResults :
      * Returns the authentication result for dkim.
      */
     public bool is_dkim_valid() {
-        return /^.*;[ ]*dkim=pass.*$/i.match(this.value);
+        return /^.*dkim=pass.*$/i.match(this.value);
     }
 
      /**
      * Returns the authentication result for dmarc.
      */
     public bool is_dmarc_valid() {
-        return /^.*;[ ]*dmarc=pass.*$/i.match(this.value);
+        return /^.*dmarc=pass.*$/i.match(this.value);
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]