all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Amin Bandali <bandali@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 893111f 2/2: Hide passwords in .authinfo and .netrc files
Date: Sun, 22 Sep 2019 14:36:20 +0200	[thread overview]
Message-ID: <87lfugwlrv.fsf@gnus.org> (raw)
In-Reply-To: <875zllkamn.fsf@fencepost.gnu.org> (Amin Bandali's message of "Sat, 21 Sep 2019 10:05:36 -0400")

Amin Bandali <bandali@gnu.org> writes:

> larsi@gnus.org (Lars Ingebrigtsen) writes:
>
>> +      (while (re-search-forward "\\bpassword +\\([^\n\t ]+\\)"
>
> Would it make more sense to use '\s-' rather than '\b' here?  With '\b',
> it will match the ‘password’ in an entry like `gnus-canlock-password'
> and thus wrongly add the display property to the next word, in this case
> “password”, rather than to the actual password itself.

Good point.  I used \\b because I was thinking about whether "password"
could be the first token on a the line, but I've now changed the regexp
to be

"\\(\\s-\\|^\\)password\\s-+\\([^\n\t ]+\\)"

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



  reply	other threads:[~2019-09-22 12:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190921100408.13688.51289@vcs0.savannah.gnu.org>
     [not found] ` <20190921100410.7BD4A20520@vcs0.savannah.gnu.org>
2019-09-21 14:05   ` master 893111f 2/2: Hide passwords in .authinfo and .netrc files Amin Bandali
2019-09-22 12:36     ` Lars Ingebrigtsen [this message]
2019-09-22 13:27       ` Amin Bandali
2019-09-22 17:21         ` Lars Ingebrigtsen
2019-09-23  2:06           ` Amin Bandali
2019-09-23 10:28             ` Lars Ingebrigtsen
2019-09-23 13:47               ` Amin Bandali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfugwlrv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=bandali@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.