Commit 4e652634 authored by Daniel Colascione's avatar Daniel Colascione
Browse files

Additional type checking in secrets API

parent 363362c5
2014-02-22 Daniel Colascione <dancol@dancol.org>
* 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 <lekktu@gmail.com> 2014-02-21 Juanma Barranquero <lekktu@gmail.com>
* emacs-lisp/gv.el: Avoid duplicating gv-expander and gv-setter in * emacs-lisp/gv.el: Avoid duplicating gv-expander and gv-setter in
......
...@@ -609,6 +609,8 @@ The object paths of the found items are returned as list." ...@@ -609,6 +609,8 @@ The object paths of the found items are returned as list."
(while (consp (cdr attributes)) (while (consp (cdr attributes))
(unless (keywordp (car attributes)) (unless (keywordp (car attributes))
(error 'wrong-type-argument (car attributes))) (error 'wrong-type-argument (car attributes)))
(unless (stringp (cadr attributes))
(error 'wrong-type-argument (cadr attributes)))
(setq props (add-to-list (setq props (add-to-list
'props 'props
(list :dict-entry (list :dict-entry
...@@ -647,6 +649,8 @@ The object path of the created item is returned." ...@@ -647,6 +649,8 @@ The object path of the created item is returned."
(while (consp (cdr attributes)) (while (consp (cdr attributes))
(unless (keywordp (car attributes)) (unless (keywordp (car attributes))
(error 'wrong-type-argument (car attributes))) (error 'wrong-type-argument (car attributes)))
(unless (stringp (cadr attributes))
(error 'wrong-type-argument (cadr attributes)))
(setq props (add-to-list (setq props (add-to-list
'props 'props
(list :dict-entry (list :dict-entry
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment