Bug#1010241: libdebian-source-perl: Incorrect case sensitivity in Debian::Control::Stanza::new for field names

gregor herrmann gregoa at debian.org
Wed Apr 27 01:25:49 BST 2022


On Wed, 27 Apr 2022 09:52:07 +1000, Ben Finney wrote:

> The matching is incorrectly case-sensitive. It should accept valid
> variations such as ‘VCS-Git’ and ‘VCS-Browser’, but instead it
> crashes:
> 
>     Invalid field given (VCS_Git) at /usr/share/perl5/Debian/Control.pm line 122.
> 
> The matching should be case-insensitive, understanding ‘vcs-git’ and
> ‘VCS-Git’ and ‘Vcs-Git’ and ‘vcs-Git’ to all be the same field name.

Hm, interesting bug report :)

First, I wanted to ask "Why?" but then I found Debian Policy 5.1:

    Field names are not case-sensitive, but it is usual to capitalize the
    field names using mixed case as shown below.

Then I found t/Control.t which tests exactly this issue.

And then I found the following d/changelog entry for 0.95:

  [ Alex Muntada ]
  * Debian::Control::Stanza: accept case-insensitive field names in new()
    as required by Debian Policy while retaining the canonical accessors.
    Thanks to Ben Finney for the bug report. (Closes: #860023)

And #860023 from 5 years ago is also interesting :)


But yeah, it's not only a déjà-vu, apparently we need to take a look
at this part of the code again …


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20220427/73a79a70/attachment.sig>


More information about the pkg-perl-maintainers mailing list