Bug 1852414

Summary: perl-Email-MIME-ContentType 1.024.1 appears to break bugzilla
Product: [Fedora] Fedora EPEL Reporter: Frank Ch. Eigler <fche>
Component: perl-Email-MIME-ContentTypeAssignee: Tom "spot" Callaway <spotrh>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel8CC: jose.p.oliveira.oss, paul, perl-devel, rob.myers, spotrh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frank Ch. Eigler 2020-06-30 11:23:39 UTC
Bugzilla 5.0* on sourceware.org / gcc.gnu.org has been disabled, apparently by an update to this package.

perl-Email-MIME-ContentType-1.024-1.epel8.playground.noarch

The following error message is generated when outgoing mail is being originated.

Invalid Content-Type 'subtype' parameter at Bugzilla/BugMail.pm line 471.

Reverting perl-Email-MIME and perl-Email-MIME-ContentType to the previous (late-2019) versions fixes bugzilla.

Comment 1 Tom "spot" Callaway 2020-07-01 12:50:13 UTC
This is the change that caused the issue:

https://github.com/rjbs/Email-MIME-ContentType/commit/ed2a0311dbaa268dc575a0eb55ddaace8038571e

Essentially, one of the subtypes is not matching this regex:

my $re_token = qr/[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+/; # US-ASCII except SPACE, CTLs and tspecials ()<>@,;:\\"/[]?=

If you can change this line (178) from:

croak 'Invalid Content-Type \'subtype\' parameter' if $ct->{subtype} !~ /^(?:$re_token)*$/;

to

croak "Invalid Content-Type 'subtype' parameter: '$ct->{subtype}'" if $ct->{subtype} !~ /^(?:$re_token)*$/;

I think that will shed light on what subtype in Bugzilla is not passing the regex, and whether that is a bug in Bugzilla or in the regex.

Comment 2 Paul Howarth 2020-07-11 13:46:42 UTC
Looks like Bug #1855962, which would be a bugzilla bug rather than one in 
perl-Email-MIME-ContentType.

Comment 3 Frank Ch. Eigler 2020-07-13 16:28:27 UTC
(In reply to Paul Howarth from comment #2)
> Looks like Bug #1855962, which would be a bugzilla bug rather than one in 
> perl-Email-MIME-ContentType.

Arguably, infrastructure code should not add new assertions ("croak") that result in program crashes for API usage that was formerly acceptable.  Perhaps consider turning that into a warning, if the Email-MIME code can tolerate the previous usage?