Bug 241890
| Summary: | bugs.webkit.org returns 500 error when github commit URL is entered into the Comment field. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | lingho <lingho> |
| Component: | WebKit Website | Assignee: | lingho <lingho> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=242128 | ||
lingho@apple.com
https://github.com/WebKit/WebKit/commit/431f4db465c43b419910c6889d60edb9454a7de5#r76747819
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
lingho@apple.com
test
lingho@apple.com
https://github.com/WebKit/WebKit/commit/431f4db465c43b419910c6889d60edb9454a7de5#r76747819
lingho@apple.com
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.
lingho@apple.com
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
Radar WebKit Bug Importer
<rdar://problem/95820523>
lingho@apple.com
*** Bug 241891 has been marked as a duplicate of this bug. ***
lingho@apple.com
*** Bug 241892 has been marked as a duplicate of this bug. ***
lingho@apple.com
*** Bug 241893 has been marked as a duplicate of this bug. ***
lingho@apple.com
*** Bug 241896 has been marked as a duplicate of this bug. ***
lingho@apple.com
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.
lingho@apple.com
Pull request: https://github.com/WebKit/WebKit/pull/1761
EWS
Committed 253885@main (b823352209d3): <https://commits.webkit.org/253885@main>
Reviewed commits have been landed. Closing PR #1761 and removing active labels.