GNU bug report logs - #32220
27.0.50; Prefer ?* to hide passwords

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Fri, 20 Jul 2018 08:05:02 UTC

Severity: wishlist

Found in version 27.0.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32220 in the body.
You can then email your comments to 32220 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, npostavs <at> gmail.com, eliz <at> gnu.org, tino.calancha <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#32220; Package emacs. (Fri, 20 Jul 2018 08:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tino Calancha <tino.calancha <at> gmail.com>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, npostavs <at> gmail.com, eliz <at> gnu.org, tino.calancha <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Fri, 20 Jul 2018 08:05:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Prefer ?* to hide passwords
Date: Fri, 20 Jul 2018 17:04:39 +0900
X-Debbugs-Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,Noam Postavsky <npostavs <at> gmail.com>,Eli Zaretskii <eliz <at> gnu.org>,tino.calancha <at> gmail.com

It might be argued that a hidden string is more legible when using
?* as the hidden character instead of ?.
For example, the following strings have the same length:
"......"

"******"

Following patch uses ?* as default character to hide passwords instead
of ?.

--8<-----------------------------cut here---------------start------------->8---
commit 6b5c3db59650590d9db24ef110b972019b24e03a
Author: Tino Calancha <tino.calancha <at> gmail.com>
Date:   Fri Jul 20 16:58:33 2018 +0900

    Prefer ?* to hide passwords
    
    It might be argued that a hidden string is more legible when using
    ?* as the hidden character instead of ?.
    For example, the following strings have the same length:
    "......"
    
    "******"
    
    It's slighly easier to visually count the number of characters in the second
    string (Bug#32220).
    
    * lisp/subr.el (read-passwd): Prefer ?* as default char instead of ?.
    * doc/lispref/minibuf.texi (Reading a Password): Update manual.
    ; * etc/NEWS (Changes in Emacs 27.1): Announce the change.

diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 889b64af8a..d091787a68 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2199,7 +2199,7 @@ Reading a Password
 @defun read-passwd prompt &optional confirm default
 This function reads a password, prompting with @var{prompt}.  It does
 not echo the password as the user types it; instead, it echoes
-@samp{.}  for each character in the password.  If you want to apply
+@samp{*}  for each character in the password.  If you want to apply
 another character to hide the password, let-bind the variable
 @code{read-hide-char} with that character.
 
diff --git a/etc/NEWS b/etc/NEWS
index 8275cbb72c..f21da91a4b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -84,6 +84,9 @@ work right without some adjustment:
 
 * Changes in Emacs 27.1
 
++++
+** The function 'read-passwd' uses '*' as default character to hide passwords.
+
 ---
 ** New variable 'xft-ignore-color-fonts'.
 Default t means don't try to load color fonts when using Xft, as they
diff --git a/lisp/subr.el b/lisp/subr.el
index 10343e69db..59a6209af3 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2305,7 +2305,7 @@ read-passwd
 If optional CONFIRM is non-nil, read the password twice to make sure.
 Optional DEFAULT is a default password to use instead of empty input.
 
-This function echoes `.' for each character that the user types.
+This function echoes `*' for each character that the user types.
 You could let-bind `read-hide-char' to another hiding character, though.
 
 Once the caller uses the password, it can erase the password
@@ -2331,7 +2331,7 @@ read-passwd
                                      beg)))
              (dotimes (i (- end beg))
                (put-text-property (+ i beg) (+ 1 i beg)
-                                  'display (string (or read-hide-char ?.))))))
+                                  'display (string (or read-hide-char ?*))))))
           minibuf)
       (minibuffer-with-setup-hook
           (lambda ()
@@ -2346,7 +2346,7 @@ read-passwd
             (add-hook 'after-change-functions hide-chars-fun nil 'local))
         (unwind-protect
             (let ((enable-recursive-minibuffers t)
-		  (read-hide-char (or read-hide-char ?.)))
+		  (read-hide-char (or read-hide-char ?*)))
               (read-string prompt nil t default)) ; t = "no history"
           (when (buffer-live-p minibuf)
             (with-current-buffer minibuf

--8<-----------------------------cut here---------------end--------------->8---

In GNU Emacs 27.0.50 (build 18, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2018-07-20
Repository revision: fb24ce37d1bc258cfc3884d9828aa0602fa06e1d
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 9 (stretch)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32220; Package emacs. (Fri, 20 Jul 2018 12:07:02 GMT) Full text and rfc822 format available.

Message #8 received at 32220 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: eli zaretskii <eliz <at> gnu.org>, noam postavsky <npostavs <at> gmail.com>,
 32220 <at> debbugs.gnu.org
Subject: Re: bug#32220: 27.0.50; Prefer ?* to hide passwords
Date: Fri, 20 Jul 2018 08:06:42 -0400
> It might be argued that a hidden string is more legible when using
> ?* as the hidden character instead of ?.
> For example, the following strings have the same length:
> "......"
>
> "******"
>
> Following patch uses ?* as default character to hide passwords instead
> of ?.

No objection on my side,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32220; Package emacs. (Fri, 27 Jul 2018 02:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 32220 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: eli zaretskii <eliz <at> gnu.org>
Cc: 32220 <at> debbugs.gnu.org
Subject: Re: bug#32220: 27.0.50; Prefer ?* to hide passwords
Date: Fri, 27 Jul 2018 11:31:08 +0900
Tino Calancha <tino.calancha <at> gmail.com> writes:

> commit 6b5c3db59650590d9db24ef110b972019b24e03a
> Author: Tino Calancha <tino.calancha <at> gmail.com>
> Date:   Fri Jul 20 16:58:33 2018 +0900
>
>     Prefer ?* to hide passwords
>     
>     It might be argued that a hidden string is more legible when using
>     ?* as the hidden character instead of ?.
>     For example, the following strings have the same length:
>     "......"
>     
>     "******"
>     
>     It's slighly easier to visually count the number of characters in the second
>     string (Bug#32220).
>     
>     * lisp/subr.el (read-passwd): Prefer ?* as default char instead of ?.
>     * doc/lispref/minibuf.texi (Reading a Password): Update manual.
>     ; * etc/NEWS (Changes in Emacs 27.1): Announce the change.
Eli, which branch is suitable for this patch?  Next release or master?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32220; Package emacs. (Fri, 27 Jul 2018 12:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 32220 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 32220 <at> debbugs.gnu.org
Subject: Re: bug#32220: 27.0.50; Prefer ?* to hide passwords
Date: Fri, 27 Jul 2018 15:34:32 +0300
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Cc: 32220 <at> debbugs.gnu.org
> Date: Fri, 27 Jul 2018 11:31:08 +0900
> 
> Eli, which branch is suitable for this patch?  Next release or master?

Master, I think.

Thanks.




Reply sent to Tino Calancha <tino.calancha <at> gmail.com>:
You have taken responsibility. (Sun, 29 Jul 2018 12:26:02 GMT) Full text and rfc822 format available.

Notification sent to Tino Calancha <tino.calancha <at> gmail.com>:
bug acknowledged by developer. (Sun, 29 Jul 2018 12:26:02 GMT) Full text and rfc822 format available.

Message #19 received at 32220-done <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 32220-done <at> debbugs.gnu.org
Subject: Re: bug#32220: 27.0.50; Prefer ?* to hide passwords
Date: Sun, 29 Jul 2018 21:25:35 +0900
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Tino Calancha <tino.calancha <at> gmail.com>
>> Cc: 32220 <at> debbugs.gnu.org
>> Date: Fri, 27 Jul 2018 11:31:08 +0900
>> 
>> Eli, which branch is suitable for this patch?  Next release or master?
>
> Master, I think.
Thank you.
Pushed into the master branch as commit 'Prefer ?* to hide passwords'
(b3f7e73fb76a366dc644ee2e6b9f4897c17d201d)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Aug 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.