1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Use clear-string instead of fillarray to clobber secret strings

* lisp/net/sasl-cram.el (sasl-cram-md5-response):
* lisp/net/sasl-digest.el (sasl-digest-md5-response-value):
* lisp/net/sasl.el (sasl-plain-response):
`fillarray` signals an error for strings that contain multibyte chars;
`clear-string` always works for this purpose.
This commit is contained in:
Mattias Engdegård 2024-05-07 09:19:09 +02:00
parent b08d5158c4
commit 1ac70626fa
3 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@
(concat (sasl-client-name client) " "
(encode-hex-string
(hmac-md5 (sasl-step-data step) passphrase)))
(fillarray passphrase 0))))
(clear-string passphrase))))
(put 'sasl-cram 'sasl-mechanism
(sasl-make-mechanism "CRAM-MD5" sasl-cram-md5-steps))

View File

@ -107,7 +107,7 @@ charset algorithm cipher-opts auth-param)."
(concat "AUTHENTICATE:" digest-uri
(if (member qop '("auth-int" "auth-conf"))
":00000000000000000000000000000000")))))))
(fillarray passphrase 0))))
(clear-string passphrase))))
(defun sasl-digest-md5-response (client step)
(let* ((plist

View File

@ -219,7 +219,7 @@ It contain at least 64 bits of entropy."
(not (string= authenticator-name name)))
(concat authenticator-name "\0" name "\0" passphrase)
(concat "\0" name "\0" passphrase))
(fillarray passphrase 0))))
(clear-string passphrase))))
(put 'sasl-plain 'sasl-mechanism
(sasl-make-mechanism "PLAIN" sasl-plain-steps))