Bug 241890 - bugs.webkit.org returns 500 error when github commit URL is entered into the Comment field.
Summary: bugs.webkit.org returns 500 error when github commit URL is entered into the ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: lingho@apple.com
URL:
Keywords: InRadar
: 241891 241892 241893 241896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-22 17:28 PDT by lingho@apple.com
Modified: 2022-08-28 14:10 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 lingho@apple.com 2022-06-23 01:55:47 PDT
test
Comment 3 lingho@apple.com 2022-06-23 17:58:19 PDT
As soon as a github.com Commit URL such as https://github.com/WebKit/WebKit/commit/431f4db465c43b419910c6889d60edb9454a7de5#r76747819 is entered into the Comment field, and saved, Bugzilla produces a 500 error.

Any subsequence actions on the bug causes the same error.
Comment 4 lingho@apple.com 2022-06-23 17:59:48 PDT
This error is shown in /var/log/httpd/error_log.

[Thu Jun 23 01:55:47.252524 2022] [:error] [pid 11149] "\\x{fdd2}" does not map to utf8 at /usr/lib64/perl5/vendor_perl/Encode.pm line 160.\n
Comment 5 Radar WebKit Bug Importer 2022-06-23 18:00:26 PDT
<rdar://problem/95820523>
Comment 6 lingho@apple.com 2022-06-23 18:01:00 PDT
*** Bug 241891 has been marked as a duplicate of this bug. ***
Comment 7 lingho@apple.com 2022-06-23 18:01:13 PDT
*** Bug 241892 has been marked as a duplicate of this bug. ***
Comment 8 lingho@apple.com 2022-06-23 18:01:26 PDT
*** Bug 241893 has been marked as a duplicate of this bug. ***
Comment 9 lingho@apple.com 2022-06-23 18:01:41 PDT
*** Bug 241896 has been marked as a duplicate of this bug. ***
Comment 10 lingho@apple.com 2022-06-23 18:14:19 PDT
I was unabled to reproduce this on the UAT server.

However, adding the URL in the Comment field, then clicking on Preview shows that the URL is being turned into a link, while the revision is also being converted into a https://commits.webkit.or URL one way or another.

The revision part of the link then became https://github.com/WebKit/WebKit/commit/431f4db465c43b419910c6889d60edb9454a7de5#﷒0﷓

This seems to be happenning here in Bugzilla/Template.pm:
        my ($match, $replace) = @$re{qw(match replace)};
        if (ref($replace) eq 'CODE') {
            $text =~ s/$match/($things[$count++] = $replace->({matches => [
                                                               $1, $2, $3, $4,
                                                               $5, $6, $7, $8,
                                                               $9, $10]}))
                               && ("\x{FDD2}" . ($count-1) . "\x{FDD3}")/egx;
        }


Fixing the Commit extention to not replace a revision number when it follows a hash prevented this issue, and got rid of the 500 error.
Comment 11 lingho@apple.com 2022-06-23 18:26:00 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1761
Comment 12 EWS 2022-08-28 14:10:26 PDT
Committed 253885@main (b823352209d3): <https://commits.webkit.org/253885@main>

Reviewed commits have been landed. Closing PR #1761 and removing active labels.