<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>241890</bug_id>
          
          <creation_ts>2022-06-22 17:28:09 -0700</creation_ts>
          <short_desc>bugs.webkit.org returns 500 error when github commit URL is entered into the Comment field.</short_desc>
          <delta_ts>2022-08-28 14:10:27 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Website</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=242128</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="lingho@apple.com">lingho</reporter>
          <assigned_to name="lingho@apple.com">lingho</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1877503</commentid>
    <comment_count>0</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-22 17:28:09 -0700</bug_when>
    <thetext>https://github.com/WebKit/WebKit/commit/431f4db465c43b419910c6889d60edb9454a7de5#r76747819</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877600</commentid>
    <comment_count>1</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 01:55:47 -0700</bug_when>
    <thetext>test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877680</commentid>
    <comment_count>2</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 10:08:37 -0700</bug_when>
    <thetext>https://github.com/WebKit/WebKit/commit/431f4db465c43b419910c6889d60edb9454a7de5#r76747819</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878055</commentid>
    <comment_count>3</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 17:58:19 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878056</commentid>
    <comment_count>4</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 17:59:48 -0700</bug_when>
    <thetext>This error is shown in /var/log/httpd/error_log.

[Thu Jun 23 01:55:47.252524 2022] [:error] [pid 11149] &quot;\\x{fdd2}&quot; does not map to utf8 at /usr/lib64/perl5/vendor_perl/Encode.pm line 160.\n</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878057</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-23 18:00:26 -0700</bug_when>
    <thetext>&lt;rdar://problem/95820523&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878059</commentid>
    <comment_count>6</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 18:01:00 -0700</bug_when>
    <thetext>*** Bug 241891 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878061</commentid>
    <comment_count>7</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 18:01:13 -0700</bug_when>
    <thetext>*** Bug 241892 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878063</commentid>
    <comment_count>8</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 18:01:26 -0700</bug_when>
    <thetext>*** Bug 241893 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878066</commentid>
    <comment_count>9</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 18:01:41 -0700</bug_when>
    <thetext>*** Bug 241896 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878071</commentid>
    <comment_count>10</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 18:14:19 -0700</bug_when>
    <thetext>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 &apos;CODE&apos;) {
            $text =~ s/$match/($things[$count++] = $replace-&gt;({matches =&gt; [
                                                               $1, $2, $3, $4,
                                                               $5, $6, $7, $8,
                                                               $9, $10]}))
                               &amp;&amp; (&quot;\x{FDD2}&quot; . ($count-1) . &quot;\x{FDD3}&quot;)/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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878079</commentid>
    <comment_count>11</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2022-06-23 18:26:00 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/1761</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894339</commentid>
    <comment_count>12</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-08-28 14:10:26 -0700</bug_when>
    <thetext>Committed 253885@main (b823352209d3): &lt;https://commits.webkit.org/253885@main&gt;

Reviewed commits have been landed. Closing PR #1761 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>