emacs-devel
[Top][All Lists]
Advanced

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

Re: master 893111f 2/2: Hide passwords in .authinfo and .netrc files


From: Lars Ingebrigtsen
Subject: Re: master 893111f 2/2: Hide passwords in .authinfo and .netrc files
Date: Sun, 22 Sep 2019 14:36:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Amin Bandali <address@hidden> writes:

> address@hidden (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 via email to

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