From: Daniel Colascione Date: Sat, 22 Feb 2014 00:47:42 +0000 (-0800) Subject: Additional type checking in secrets API X-Git-Tag: emacs-24.3.90~173^2^2~20 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4e6526341d2a8a5884e760ed6815f0de22529b15;p=emacs.git Additional type checking in secrets API --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6fb588381fe..82c24f11643 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-02-22 Daniel Colascione + + * net/secrets.el (secrets-create-item,secrets-search-items): Check + that attribute values are strings, avoiding the construction of + invalid dbus messages. + 2014-02-21 Juanma Barranquero * emacs-lisp/gv.el: Avoid duplicating gv-expander and gv-setter in diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index a0f30e321d5..9ba9bd0d3cc 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -609,6 +609,8 @@ The object paths of the found items are returned as list." (while (consp (cdr attributes)) (unless (keywordp (car attributes)) (error 'wrong-type-argument (car attributes))) + (unless (stringp (cadr attributes)) + (error 'wrong-type-argument (cadr attributes))) (setq props (add-to-list 'props (list :dict-entry @@ -647,6 +649,8 @@ The object path of the created item is returned." (while (consp (cdr attributes)) (unless (keywordp (car attributes)) (error 'wrong-type-argument (car attributes))) + (unless (stringp (cadr attributes)) + (error 'wrong-type-argument (cadr attributes))) (setq props (add-to-list 'props (list :dict-entry