mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
Protect against bad results from libravatar
* lisp/image/gravatar.el (gravatar--service-libravatar): Don't have (gravatar-retrieve "foobar@zjp.codes" 'ignore) (which returns a CNAME) bug out.
This commit is contained in:
parent
64d4648869
commit
0120f45db6
1 changed files with 9 additions and 5 deletions
|
|
@ -160,12 +160,16 @@ to track whether you're reading a specific mail."
|
|||
(cond
|
||||
((and
|
||||
result ;there is a result
|
||||
(let* ((data (mapcar (lambda (record)
|
||||
(let* ((answers (dns-get 'answers result))
|
||||
(data (mapcar (lambda (record)
|
||||
(dns-get 'data (cdr record)))
|
||||
(dns-get 'answers result)))
|
||||
(priorities (mapcar (lambda (r)
|
||||
(dns-get 'priority r))
|
||||
data))
|
||||
;; We may get junk data back (or CNAME;
|
||||
;; ignore).
|
||||
(and (eq (dns-get 'type answers) 'SRV)
|
||||
answers)))
|
||||
(priorities (and (mapcar (lambda (r)
|
||||
(dns-get 'priority r))
|
||||
data)))
|
||||
(max-priority (if priorities
|
||||
(apply #'max priorities)
|
||||
0))
|
||||
|
|
|
|||
Loading…
Reference in a new issue