From 27ef29a7a21635e2e578dd207dd6b751b082ed08 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Thu, 11 Apr 2013 13:50:04 +0100 Subject: [PATCH] Copy the string received from auth-source The SASL library likes to erase the string, so make sure it doesn't erase the cached string. --- jabber-util.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jabber-util.el b/jabber-util.el index 822ef60..c4b8a97 100644 --- a/jabber-util.el +++ b/jabber-util.el @@ -317,9 +317,10 @@ If FULLJIDS is non-nil, complete jids with resources." :require '(:secret)))))) (if found (let ((secret (plist-get found :secret))) - (if (functionp secret) - (funcall secret) - secret)) + (copy-sequence + (if (functionp secret) + (funcall secret) + secret))) (let ((prompt (format "Jabber password for %s: " bare-jid))) (if (require 'password-cache nil t) ;; Need to copy the password, as sasl.el wants to erase it.