lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 27 Nov 2021 12:20:18 -0800
From:   Junio C Hamano <gitster@...ox.com>
To:     Eric Wong <e@...24.org>
Cc:     Thorsten Leemhuis <linux@...mhuis.info>, workflows@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Konstantin Ryabitsev <konstantin@...uxfoundation.org>,
        Jonathan Corbet <corbet@....net>, git@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags
 'Reported:' and 'Reviewed:'

Eric Wong <e@...24.org> writes:

> Thorsten Leemhuis <linux@...mhuis.info> wrote:
>> Just to be sure I'll do what you expect to be done: I assume you want to see
>> it changed like this?
>> 
>> -	perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
> ...
> The entire match should be case-insensitive[1], so I'd add `i'
> at the end:
>
> 	perl -pi -e 's|^Message-ID:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|gi;' "$1"
>
> Fwiw, every mail and HTTP/1.x header parser I've looked at works
> case-insensitively.  Also, I'm not sure if `g' is needed, actually...

It is left anchored with "^" so it would be hard to match more than
once on the same line ;-)

I agree that it is the right solution to make the whole thing
case-insensitive by adding 'i' at the end.

FWIW, the RFC first says this:

    1.2.2. Syntactic notation

       This standard uses the Augmented Backus-Naur Form (ABNF) notation
       specified in [RFC2234] for the formal definitions of the syntax of
       messages.  Characters will be specified either by a decimal value
       (e.g., the value %d65 for uppercase A and %d97 for lowercase A) or by
       a case-insensitive literal value enclosed in quotation marks (e.g.,
       "A" for either uppercase or lowercase A).

and then goes on to define how message-id should look like.

    3.6.4. Identification fields

    message-id      =       "Message-ID:" msg-id CRLF


But if you go the "add /i at the end" route, you do not have to
upcase "d" to "D" and that may reduce the patch noise (it only
matters if the patch viewer highlights letter-by-letter changes for
your recipients).

HTH

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ