From unknown Sat Jun 14 19:16:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32220: 27.0.50; Prefer ?* to hide passwords Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, npostavs@gmail.com, eliz@gnu.org, tino.calancha@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jul 2018 08:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 32220@debbugs.gnu.org Cc: stefan monnier ,noam postavsky ,eli zaretskii ,tino.calancha@gmail.com X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: stefan monnier ,noam postavsky ,eli zaretskii ,tino.calancha@gmail.com Received: via spool by submit@debbugs.gnu.org id=B.153207390017156 (code B ref -1); Fri, 20 Jul 2018 08:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jul 2018 08:05:00 +0000 Received: from localhost ([127.0.0.1]:48761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgQPL-0004Se-V1 for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:05:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgQPK-0004SS-84 for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgQPD-0003sk-RA for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:04:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgQPD-0003sY-NC for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:04:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgQPC-0001aF-BZ for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgQP9-0003ry-4J for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:04:50 -0400 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:33247) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgQP8-0003rl-Th for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:04:47 -0400 Received: by mail-pl0-x244.google.com with SMTP id 6-v6so4859803plb.0 for ; Fri, 20 Jul 2018 01:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=2buoQ+NtNlJQ0Qq/KoLwCoX8xGeo8QAqRFzHw6ilXDQ=; b=PEfhB9WUiJtpDzeb2Xu9VpgWpIvaTwsV2MsNvpYb4S3WY3tBUiMIBe07ZHnPKnHE2l sw4tLQeM+p8vfvff6YIVkuRKLTDGTMNSt10c0azB4vsv04woo+cWf5l7CQ+mG7SdaZHp dsDT+Z5w/RXv1YVwOxMXPlVt/WvGOdXQ34VrkwuOsTfny+TJSArGQVNeS7YXUXCY0Uv/ TQPcHMAoiCkFh96GzdQpwAUx4JMZ4Ht5QrAy+Iy1Gw/N8mcZsdVO4cjrDuUVlPSctE3f b3gMXYoQM9YZ/z8WQ8oaY5nogFeguC8EHGXbIqRu2KZ3yw9U5M6fdGW+x064TPvLIhss OeuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=2buoQ+NtNlJQ0Qq/KoLwCoX8xGeo8QAqRFzHw6ilXDQ=; b=XAPWw7EUfdXrqNZfzl7a8SwNfTF/aQl73QF/wwQ9uVoE8DbkeuEmXlB6NsVbDeUHIh fyRXEDK+a/01+kmerDNAk1CBERqc9OBe5ePI1WVUNwjyA4bOLwhjYvernNZkBLXWSf2g LVt1VQVGApCMt3tJYTuh+kuqjYkDfTtyng5QfeFiTMtqsaC5CzG4LqMRJwIOf17S/7fj s/wpiCwWv8asRl8dvAyt3WoPNoK/l3MXWwl+hJ3gto9qy8yFU4PtJ9AXyZJ5/ieaq+p0 QbttilH9OVj9t+blczfPHfflLSYsI6qANxUvbredUhJam1HExUoaaYMHp3mlNiILhWPB +7kw== X-Gm-Message-State: AOUpUlFyzyWC9NDJbNlxf8ZUZfdA6hgH25c5NNjZciRtT6nSmJdlbbfF w5rsIyK2XLN8r9A0cQr67lhjxxgx X-Google-Smtp-Source: AAOMgpdxJSoyDjPGilu3F7seDzv7Bl1t67XsfmjfOaOkeJcxvTC8SQzwetm0BqWaG4TkFu3mF2BJXg== X-Received: by 2002:a17:902:7894:: with SMTP id q20-v6mr1117592pll.3.1532073885027; Fri, 20 Jul 2018 01:04:45 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp (195.139.137.133.dy.bbexcite.jp. [133.137.139.195]) by smtp.gmail.com with ESMTPSA id y9-v6sm1322560pgv.31.2018.07.20.01.04.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jul 2018 01:04:44 -0700 (PDT) From: Tino Calancha Date: Fri, 20 Jul 2018 17:04:39 +0900 Message-ID: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) X-Debbugs-Cc: Stefan Monnier ,Noam Postavsky ,Eli Zaretskii ,tino.calancha@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 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) From unknown Sat Jun 14 19:16:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32220: 27.0.50; Prefer ?* to hide passwords Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jul 2018 12:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: eli zaretskii , noam postavsky , 32220@debbugs.gnu.org Received: via spool by 32220-submit@debbugs.gnu.org id=B32220.153208840631391 (code B ref 32220); Fri, 20 Jul 2018 12:07:02 +0000 Received: (at 32220) by debbugs.gnu.org; 20 Jul 2018 12:06:46 +0000 Received: from localhost ([127.0.0.1]:48908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgUBJ-0008AE-QX for submit@debbugs.gnu.org; Fri, 20 Jul 2018 08:06:45 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:48424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgUBI-0008A4-1S for 32220@debbugs.gnu.org; Fri, 20 Jul 2018 08:06:44 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w6KC6g99011822; Fri, 20 Jul 2018 08:06:43 -0400 Received: by pastel.home (Postfix, from userid 20848) id 25CAB64F3E; Fri, 20 Jul 2018 08:06:42 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> Date: Fri, 20 Jul 2018 08:06:42 -0400 In-Reply-To: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> (Tino Calancha's message of "Fri, 20 Jul 2018 17:04:39 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6333=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6333> : inlines <6766> : streams <1793090> : uri <2676450> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 From unknown Sat Jun 14 19:16:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32220: 27.0.50; Prefer ?* to hide passwords Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jul 2018 02:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: eli zaretskii Cc: 32220@debbugs.gnu.org Received: via spool by 32220-submit@debbugs.gnu.org id=B32220.15326586829452 (code B ref 32220); Fri, 27 Jul 2018 02:32:02 +0000 Received: (at 32220) by debbugs.gnu.org; 27 Jul 2018 02:31:22 +0000 Received: from localhost ([127.0.0.1]:59439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fisXK-0002SO-Lm for submit@debbugs.gnu.org; Thu, 26 Jul 2018 22:31:22 -0400 Received: from mail-pg1-f169.google.com ([209.85.215.169]:41503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fisXJ-0002SC-GU for 32220@debbugs.gnu.org; Thu, 26 Jul 2018 22:31:21 -0400 Received: by mail-pg1-f169.google.com with SMTP id z8-v6so2304047pgu.8 for <32220@debbugs.gnu.org>; Thu, 26 Jul 2018 19:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=M/GErQkbXUtkWCP3lAGqXWBeG8lhUOHaSlVwSDd0Fk0=; b=CsL4g8iY8C5lCB0PnmOS23AuQmM8d2ZhFJ4vrWuIp7xkzxlaA4r9yVWwBI9Q6sDA6C uL7Ghw6js2HRh8HEEB0K0yVPDfzLpBdp/syx/Idir9p0m2OMFFagbFT3PJh9GlEwLrQK kAY0MBOtdXdZWqEytT5PYw1miduhvLOUlohCzzXWvN4gdj8caXTePNIcNf5lyJMkG6In CKlnwcmBZJ1AQ9wS4U0xHuYRWf6ohr5VjUI2YS+F8xvVJak2axfDDpAg5AyHhmof1pT7 UJjCQTfm9UtQmYe36aNzGULWzEo0Kzf+xkYuHehEHdxau9/cEyzlh/Sw9WXvrs/kwbuq scmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=M/GErQkbXUtkWCP3lAGqXWBeG8lhUOHaSlVwSDd0Fk0=; b=KOT/0y+9O5+8Y+fnFKrlhM4sp5v8nulbFg++EoHHPnoPl0h+9XQvcXfS48ncRYzdWC cdMdV3wZMc6McQwawhvn1Roe76w+Dc7+3sESFikgbDK02nx+tyCFPhbjwmzW3UNv72Ry Q1hQQtvqidqfwReTpY7iaKSDvRtCPd50IhmN9S+xo4Q7IKX1VCiu75CFS3bJ/bKC6PMs mhS2M/HQ6C1t46rpwv0PkiOmvQVda2dVxazSC5DgWc9IJ95+z+j+LMdEWhD0V1a9o0e2 BW2WuqPEKgQXF+9Bc+fkTmLRuQ6AXyzuXEzvF3oec6iA4pJumTK7dqzpUS32OIOXjV5L TgKw== X-Gm-Message-State: AOUpUlGhWSFJtKjo3c3xti6+t7DtIMT81acgyowG93+a/A80dKlmCqei IxfCFUfxmpldj/aAkGNLRueKJE7L X-Google-Smtp-Source: AAOMgpfbpyarCTmHrUuddNGqd6G/294Sch1ajg0wib/NJXDn4s5OdjyTNNsEjV8wh8QFMEDNt3jhSw== X-Received: by 2002:a63:941a:: with SMTP id m26-v6mr4141267pge.82.1532658675203; Thu, 26 Jul 2018 19:31:15 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp ([210.164.9.11]) by smtp.gmail.com with ESMTPSA id d132-v6sm3654433pgc.93.2018.07.26.19.31.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Jul 2018 19:31:14 -0700 (PDT) From: Tino Calancha References: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> Date: Fri, 27 Jul 2018 11:31:08 +0900 In-Reply-To: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> (Tino Calancha's message of "Fri, 20 Jul 2018 17:04:39 +0900") Message-ID: <877elh76kz.fsf@calancha-pc.dy.bbexcite.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Tino Calancha writes: > commit 6b5c3db59650590d9db24ef110b972019b24e03a > Author: Tino Calancha > 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? From unknown Sat Jun 14 19:16:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32220: 27.0.50; Prefer ?* to hide passwords Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jul 2018 12:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 32220@debbugs.gnu.org Received: via spool by 32220-submit@debbugs.gnu.org id=B32220.153269488516056 (code B ref 32220); Fri, 27 Jul 2018 12:35:02 +0000 Received: (at 32220) by debbugs.gnu.org; 27 Jul 2018 12:34:45 +0000 Received: from localhost ([127.0.0.1]:59700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj1xF-0004Au-F7 for submit@debbugs.gnu.org; Fri, 27 Jul 2018 08:34:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj1xD-0004Ah-OG for 32220@debbugs.gnu.org; Fri, 27 Jul 2018 08:34:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj1x3-0007DI-KV for 32220@debbugs.gnu.org; Fri, 27 Jul 2018 08:34:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj1x3-0007DB-G3; Fri, 27 Jul 2018 08:34:33 -0400 Received: from [176.228.60.248] (port=3179 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fj1x2-0003CO-Ao; Fri, 27 Jul 2018 08:34:32 -0400 Date: Fri, 27 Jul 2018 15:34:32 +0300 Message-Id: <83d0v8svqf.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <877elh76kz.fsf@calancha-pc.dy.bbexcite.jp> (message from Tino Calancha on Fri, 27 Jul 2018 11:31:08 +0900) References: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> <877elh76kz.fsf@calancha-pc.dy.bbexcite.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Tino Calancha > Cc: 32220@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. From unknown Sat Jun 14 19:16:09 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tino Calancha Subject: bug#32220: closed (Re: bug#32220: 27.0.50; Prefer ?* to hide passwords) Message-ID: References: <87in4y1b5s.fsf@calancha-pc.dy.bbexcite.jp> <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> X-Gnu-PR-Message: they-closed 32220 X-Gnu-PR-Package: emacs Reply-To: 32220@debbugs.gnu.org Date: Sun, 29 Jul 2018 12:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1532867162-13218-1" This is a multi-part message in MIME format... ------------=_1532867162-13218-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32220: 27.0.50; Prefer ?* to hide passwords which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 32220@debbugs.gnu.org. --=20 32220: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32220 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1532867162-13218-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32220-done) by debbugs.gnu.org; 29 Jul 2018 12:25:54 +0000 Received: from localhost ([127.0.0.1]:33268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fjkll-0003Qs-UY for submit@debbugs.gnu.org; Sun, 29 Jul 2018 08:25:54 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:42912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fjklk-0003Qg-9V for 32220-done@debbugs.gnu.org; Sun, 29 Jul 2018 08:25:52 -0400 Received: by mail-pf1-f181.google.com with SMTP id l9-v6so3327316pff.9 for <32220-done@debbugs.gnu.org>; Sun, 29 Jul 2018 05:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=zrMednp0xj7xstVHQsZ7m3qpH2K6/QJ5IOlacw1htBM=; b=tRUn+x71dC5F4itIZq6eTZa6cb/Y9g693tqFTdGB8PHS+raZjOeojWpzg3qqw4tGJM TMoXOXks8jif5/tVMzWqPF2Mj8YhAgPqRebvB5W7huL7877TLbrPL63a4B5g5DWN4CmX Y1+z1WZHHdGavh6h18ctUZNZLrMSRA8ermjmYQaoOrFJfbHMxPSRDJ7lkqLrbT6dpco6 S+YHdEdXJKTvoEa06zB57VvzNgPKAw6iIq9H8dfULQS5k696oCu4FPSrKARigk5O2iMd CB2d8laOL9NVDjWB3OA4DRFmm7maf0AXpcDrdcj0FpYcqIxIGMoqkd/6ykYYVCFw0sgm 7rcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=zrMednp0xj7xstVHQsZ7m3qpH2K6/QJ5IOlacw1htBM=; b=m7nd05RENeJvQwr29IKu2l2l205AjPvwFLsxXBANK4RCFB1Pkyg7O1/oE35+0+6taq jRHUmICTYSGUfboEyQZDT3AjrKKjcJeis7kBi90Bn/V8DY62h15tnaJ3TFrHObce54Qh ZRynDOnpvCyTsqf9tWy8AKj3t+QT7j9UnACFaoWjQ1B0tQ6K4xInP/SKnAJJ4kdR9s18 9MCMs5VBy7/iy5OLDrcDpvWMlqM+u1QDvt/KG1QfNbWu/GDQ6X4ZYvP/LpLpRzXfr+mn q9Mh4+9Hz61hFuC/XvAJ+HKoAa5kZPd7CD0hbuNgZTUG+ilQw+RMHPQsuJidaXvuci0/ F6Wg== X-Gm-Message-State: AOUpUlH2LvmPYze7v+JZEmkdEfBysuUtBLoljUtYlpZfMZZiNOQUZ4s/ IVEwHQDj0yVwPiYs1zTdIfls7oIA X-Google-Smtp-Source: AAOMgpd5QPadMn2GJfhsItsv8VeOjnAhXILtkvh0XbPdXr3wf3m5RJuGjD1dwpABBcOugVvRQRKT2g== X-Received: by 2002:a62:d94a:: with SMTP id s71-v6mr13756744pfg.164.1532867146156; Sun, 29 Jul 2018 05:25:46 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp ([171.251.222.9]) by smtp.gmail.com with ESMTPSA id q81-v6sm19609779pfd.15.2018.07.29.05.25.44 for <32220-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Jul 2018 05:25:45 -0700 (PDT) From: Tino Calancha To: 32220-done@debbugs.gnu.org Subject: Re: bug#32220: 27.0.50; Prefer ?* to hide passwords References: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> <877elh76kz.fsf@calancha-pc.dy.bbexcite.jp> <83d0v8svqf.fsf@gnu.org> Date: Sun, 29 Jul 2018 21:25:35 +0900 In-Reply-To: <83d0v8svqf.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Jul 2018 15:34:32 +0300") Message-ID: <87in4y1b5s.fsf@calancha-pc.dy.bbexcite.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32220-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Tino Calancha >> Cc: 32220@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) ------------=_1532867162-13218-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Jul 2018 08:05:00 +0000 Received: from localhost ([127.0.0.1]:48761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgQPL-0004Se-V1 for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:05:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgQPK-0004SS-84 for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgQPD-0003sk-RA for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:04:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgQPD-0003sY-NC for submit@debbugs.gnu.org; Fri, 20 Jul 2018 04:04:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgQPC-0001aF-BZ for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgQP9-0003ry-4J for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:04:50 -0400 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:33247) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgQP8-0003rl-Th for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2018 04:04:47 -0400 Received: by mail-pl0-x244.google.com with SMTP id 6-v6so4859803plb.0 for ; Fri, 20 Jul 2018 01:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=2buoQ+NtNlJQ0Qq/KoLwCoX8xGeo8QAqRFzHw6ilXDQ=; b=PEfhB9WUiJtpDzeb2Xu9VpgWpIvaTwsV2MsNvpYb4S3WY3tBUiMIBe07ZHnPKnHE2l sw4tLQeM+p8vfvff6YIVkuRKLTDGTMNSt10c0azB4vsv04woo+cWf5l7CQ+mG7SdaZHp dsDT+Z5w/RXv1YVwOxMXPlVt/WvGOdXQ34VrkwuOsTfny+TJSArGQVNeS7YXUXCY0Uv/ TQPcHMAoiCkFh96GzdQpwAUx4JMZ4Ht5QrAy+Iy1Gw/N8mcZsdVO4cjrDuUVlPSctE3f b3gMXYoQM9YZ/z8WQ8oaY5nogFeguC8EHGXbIqRu2KZ3yw9U5M6fdGW+x064TPvLIhss OeuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=2buoQ+NtNlJQ0Qq/KoLwCoX8xGeo8QAqRFzHw6ilXDQ=; b=XAPWw7EUfdXrqNZfzl7a8SwNfTF/aQl73QF/wwQ9uVoE8DbkeuEmXlB6NsVbDeUHIh fyRXEDK+a/01+kmerDNAk1CBERqc9OBe5ePI1WVUNwjyA4bOLwhjYvernNZkBLXWSf2g LVt1VQVGApCMt3tJYTuh+kuqjYkDfTtyng5QfeFiTMtqsaC5CzG4LqMRJwIOf17S/7fj s/wpiCwWv8asRl8dvAyt3WoPNoK/l3MXWwl+hJ3gto9qy8yFU4PtJ9AXyZJ5/ieaq+p0 QbttilH9OVj9t+blczfPHfflLSYsI6qANxUvbredUhJam1HExUoaaYMHp3mlNiILhWPB +7kw== X-Gm-Message-State: AOUpUlFyzyWC9NDJbNlxf8ZUZfdA6hgH25c5NNjZciRtT6nSmJdlbbfF w5rsIyK2XLN8r9A0cQr67lhjxxgx X-Google-Smtp-Source: AAOMgpdxJSoyDjPGilu3F7seDzv7Bl1t67XsfmjfOaOkeJcxvTC8SQzwetm0BqWaG4TkFu3mF2BJXg== X-Received: by 2002:a17:902:7894:: with SMTP id q20-v6mr1117592pll.3.1532073885027; Fri, 20 Jul 2018 01:04:45 -0700 (PDT) Received: from calancha-pc.dy.bbexcite.jp (195.139.137.133.dy.bbexcite.jp. [133.137.139.195]) by smtp.gmail.com with ESMTPSA id y9-v6sm1322560pgv.31.2018.07.20.01.04.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jul 2018 01:04:44 -0700 (PDT) From: Tino Calancha To: bug-gnu-emacs@gnu.org Subject: 27.0.50; Prefer ?* to hide passwords Date: Fri, 20 Jul 2018 17:04:39 +0900 Message-ID: <87bmb29vu0.fsf@calancha-pc.dy.bbexcite.jp> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) X-Debbugs-Cc: Stefan Monnier ,Noam Postavsky ,Eli Zaretskii ,tino.calancha@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 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) ------------=_1532867162-13218-1--