]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Libravatar federation handling
authorPhilip K <philipk@posteo.net>
Tue, 18 Aug 2020 19:19:21 +0000 (21:19 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 18 Aug 2020 19:19:21 +0000 (21:19 +0200)
* lisp/image/gravatar.el (gravatar--service-libravatar): Implement
correct algorithm (bug#40354).

lisp/image/gravatar.el

index 7441964095623f528205d8c217ccdba0dec5a2ff..3543be6de9198fbe16f36254c13b85c1c6934a26 100644 (file)
@@ -151,10 +151,11 @@ to track whether you're reading a specific mail."
   (save-match-data
     (if (not (string-match ".+@\\(.+\\)" addr))
         (funcall callback "https://seccdn.libravatar.org/avatar")
-      (let* ((domain (match-string 1 addr))
-             (records '(("_avatars-sec" . "https")
-                        ("_avatars" . "http")))
-             (func
+      (let ((domain (match-string 1 addr))
+            (records '(("_avatars-sec" . "https")
+                       ("_avatars" . "http")))
+            func)
+        (setq func
               (lambda (result)
                 (cond
                  ((and
@@ -205,7 +206,7 @@ to track whether you're reading a specific mail."
                    (concat (caar records) "._tcp." domain)
                    func 'SRV))
                  (t                     ;fallback
-                  (funcall callback "https://seccdn.libravatar.org/avatar"))))))
+                  (funcall callback "https://seccdn.libravatar.org/avatar")))))
         (dns-query-asynchronous
          (concat (caar records) "._tcp." domain)
          func 'SRV t)))))