Synch with Oort Gnus.
authoryamaoka <yamaoka>
Wed, 4 Sep 2002 00:24:37 +0000 (00:24 +0000)
committeryamaoka <yamaoka>
Wed, 4 Sep 2002 00:24:37 +0000 (00:24 +0000)
lisp/ChangeLog
lisp/message.el

index 47fe33c..480f5b9 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-04  Simon Josefsson  <jas@extundo.com>
+
+       * message.el (message-canlock-generate): Make sure sha1 doesn't
+       call external programs.
+
 2002-09-03  Simon Josefsson  <jas@extundo.com>
 
        * nntp.el (nntp-wait-for-string): Dont infloop if process died.
index 11c7274..71c8fd6 100644 (file)
@@ -3692,10 +3692,11 @@ documentation for the function `mail-source-touch-pop'."
 (defun message-canlock-generate ()
   "Return a string that is non-trival to guess.
 Do not use this for anything important, it is cryptographically weak."
-  (sha1 (concat (message-unique-id)
-               (format "%x%x%x" (random) (random t) (random))
-               (prin1-to-string (recent-keys))
-               (prin1-to-string (garbage-collect)))))
+  (let (sha1-maximum-internal-length)
+    (sha1 (concat (message-unique-id)
+                 (format "%x%x%x" (random) (random t) (random))
+                 (prin1-to-string (recent-keys))
+                 (prin1-to-string (garbage-collect))))))
 
 (defun message-canlock-password ()
   "The password used by message for cancel locks.