sieve-manage: return empty string if no user/password
authorJulien Danjou <julien@danjou.info>
Mon, 7 Mar 2011 15:41:26 +0000 (16:41 +0100)
committerJulien Danjou <julien@danjou.info>
Mon, 7 Mar 2011 15:41:26 +0000 (16:41 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/sieve-manage.el

index be8ecc6..3922baf 100644 (file)
@@ -1,6 +1,8 @@
 2011-03-07  Julien Danjou  <julien@danjou.info>
 
        * sieve-manage.el (sieve-sasl-auth): Create auth-info if not found.
+       (sieve-sasl-auth): Check that auth-source-search did return something,
+       or just return an empty string.
 
 2011-03-05  Antoine Levitt  <antoine.levitt@gmail.com>
 
index ec59cf3..5c2e775 100644 (file)
@@ -277,8 +277,8 @@ Valid states are `closed', `initial', `nonauth', and `auth'.")
                                           :port "sieve"
                                           :max 1
                                           :create t))
-           (user-name (plist-get (nth 0 auth-info) :user))
-           (user-password (plist-get (nth 0 auth-info) :secret))
+           (user-name (or (plist-get (nth 0 auth-info) :user) ""))
+           (user-password (or (plist-get (nth 0 auth-info) :secret) ""))
            (user-password (if (functionp user-password)
                               (funcall user-password)
                             user-password))