emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`read-passwd' and the *Messages* buffer


From: Romain Francoise
Subject: `read-passwd' and the *Messages* buffer
Date: Tue, 11 Apr 2006 22:01:18 +0200

I find it disturbing that `read-passwd' logs the minibuffer session in
the messages buffer, i.e. if you do

M-: (read-passwd "Password? ") RET

then enter, say, `foo', the messages buffer contains:

Password? 
Password? .
Password? ..
Password? ...

Is this really necessary?  Anyone who happens to see the contents of the
messages buffer then knows the length of my password...

Unless someone objects, I'll install the following patch which binds
`message-log-max' to nil during the prompting, to disable logging.

Index: lisp/subr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/subr.el,v
retrieving revision 1.502
diff -c -r1.502 subr.el
*** lisp/subr.el        6 Apr 2006 19:20:38 -0000       1.502
--- lisp/subr.el        11 Apr 2006 19:49:55 -0000
***************
*** 1540,1546 ****
        (let ((pass nil)
            (c 0)
            (echo-keystrokes 0)
!           (cursor-in-echo-area t))
        (add-text-properties 0 (length prompt)
                             minibuffer-prompt-properties prompt)
        (while (progn (message "%s%s"
--- 1540,1547 ----
        (let ((pass nil)
            (c 0)
            (echo-keystrokes 0)
!           (cursor-in-echo-area t)
!           message-log-max)
        (add-text-properties 0 (length prompt)
                             minibuffer-prompt-properties prompt)
        (while (progn (message "%s%s"

Thanks,

-- 
Romain Francoise <address@hidden> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
                                        | ever free! --Bryan W. Procter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]