branch: externals/autocrypt
commit 599d5f3f5d339b839194f8e437d34149abc57e8d
Author: Philip Kaludercic <[email protected]>
Commit: Philip Kaludercic <[email protected]>
Further improve robustness of autocrypt-process-header
---
autocrypt.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/autocrypt.el b/autocrypt.el
index 0164f40c3b..b8771150b2 100644
--- a/autocrypt.el
+++ b/autocrypt.el
@@ -377,7 +377,8 @@ Argument DATE contains the time value of the \"From\" tag."
;; https://autocrypt.org/level1.html#updating-autocrypt-peer-state
(defun autocrypt-process-header ()
"Update internal autocrypt state."
- (let* ((from (autocrypt-canonicalise (autocrypt-get-header "From")))
+ (let* ((from-raw (autocrypt-get-header "From"))
+ (from (and from-raw (autocrypt-canonicalise from-raw)))
(date (autocrypt-get-header "Date"))
(header (autocrypt-get-header "Autocrypt"))
parse addr preference keydata peer)