Subject: bug#73768: 'read-passwd-mode' can clobber user defined mode lines

From: martin rudalics <[email-masked]>
Date: Thu, 17 Oct 2024 20:09:33 +0200

> I haven't seen any application in the wild which offers cascaded
 > password input. What would be the use case for this? My feeling is, that
 > this is a misuse. We might not forbid it, but we might show a warning.

Then why does 'read-passwd' deliberately offer it via

             (let ((enable-recursive-minibuffers t)

If it's a misuse, it should rather bind it to nil.

Another mystery: After

commit de88ed8646383301f20f8340e13d43e5918310fa
Author: Lars Ingebrigtsen <[email-masked]>
Date:   Sun Oct 13 05:15:18 2019 +0200

     Hide passwords more in `read-password'

     * lisp/subr.el (read-password--hide-password): Factor out (bug#17127).
     (read-passwd): Use it in post-command-hook instead of
     after-change-functions to ensure that we hide the password no
     matter what inserts text.

entering 'read-passwd' does

             (add-hook 'post-command-hook #'read-passwd--hide-password nil t))

while exiting still does

               ;; Not sure why but it seems that there might be cases where the
               ;; minibuffer is not always properly reset later on, so undo
               ;; whatever we've done here (bug#11392).
               (remove-hook 'after-change-functions
                            #'read-passwd--hide-password 'local)

If that fix of Bug#11392 (or Bug#11397) were really needed, then we
should remove read-password--hide-password from 'post-command-hook' now.
But there were no bug reports in the last four years so probably that
bug was fixed by other means.  In either case the current 'remove-hook'
is a noop now.

martin