<?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>257546</bug_id>
          
          <creation_ts>2023-05-31 09:41:44 -0700</creation_ts>
          <short_desc>bugs.webkit.org internal server error when limiting search by 1 month</short_desc>
          <delta_ts>2023-06-01 18:10:50 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>
          <dependson>257577</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="lingho@apple.com">lingho</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>jond</cc>
    
    <cc>lingho</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1959059</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-05-31 09:41:44 -0700</bug_when>
    <thetext>When I search for bugs changed in the last month, I get an internal server error.

Steps to reproduce:
1. Open https://bugs.webkit.org/query.cgi
2. Show advanced fields.
3. Enter anything for the search string.
4. In &quot;Search By Change History&quot; below, set the search from &quot;1m&quot; to &quot;Now&quot;.
5. Hit Enter.

Results: 
-------------------
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@webkit.org to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
-------------------


This isn&apos;t happening when searching within 2 months from now, but happens again with 3 months from now. So I suspect that this is a date arithmetic bug that happens on 31st of each month, and won&apos;t reproduce tomorrow. But despite this, I suspect that this is a regression (perhaps from upgrading something underlying), because I search like this all the time, and would likely have run into this earlier if it always happened.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959099</commentid>
    <comment_count>1</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2023-05-31 12:01:53 -0700</bug_when>
    <thetext>It appears that the SqlifyDate function in Bugzilla/Search.pm takes today&apos;s date and substracts month without changing the day.

For example, giving 1m to the function returns 2023-04-31 11:06:09;
giving 3m to the function returns 2023-02-31 11:07:38 . The error most likely cause by database query with invalid date.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959109</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-05-31 12:32:48 -0700</bug_when>
    <thetext>&lt;rdar://problem/110075621&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959111</commentid>
    <comment_count>3</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2023-05-31 12:33:51 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/14546</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959165</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-05-31 15:09:25 -0700</bug_when>
    <thetext>Committed 264758@main (a9b9e3661656): &lt;https://commits.webkit.org/264758@main&gt;

Reviewed commits have been landed. Closing PR #14546 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959215</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2023-05-31 18:13:44 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 257577</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959241</commentid>
    <comment_count>6</comment_count>
    <who name="lingho@apple.com">lingho</who>
    <bug_when>2023-05-31 20:28:23 -0700</bug_when>
    <thetext>Pull request https://github.com/WebKit/WebKit/pull/14569</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1959462</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-06-01 18:10:48 -0700</bug_when>
    <thetext>Committed 264820@main (48759ded673b): &lt;https://commits.webkit.org/264820@main&gt;

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

    </bug>

</bugzilla>