Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-10597

ISE when submitting an artist edit containing negative date

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Running: test (911f3ef048)

      With Javascript enabled I'm forced to change the date:

      The year should have four digits. If you want to enter a year earlier than 1000 CE, please pad with zeros, such as “0123”.
      

      Disabled Javascript so I'm not prevented from entering negative numbers (see MBS-486) and got an ISE as result.

      Error:
      
      Caught exception in MusicBrainz::Server::Controller::Artist->edit "Date::Calc::PP::Days_in_Month(): Date::Calc::Days_in_Month(): year out of range at lib/MusicBrainz/Server/Form/Field/DatePeriod.pm line 50"
      
      Stack trace:
      
          line
      
      Time: 2020-02-02 15:10:39 UTC
      
      Host: 3c37f20e5e79
      
      Interface language: en
      
      URL: https://test.musicbrainz.org/artist/0c659e4c-1e77-491e-85f9-81f0e613657a/edit
      
      Request data:
      
      $VAR1 = {
                'body_parameters' => {
                                       'edit-artist.period.begin_date.year' => '-0179',
                                       'edit-artist.begin_area.gid' => '',
                                       'edit-artist.make_votable' => '1',
                                       'edit-artist.end_area.gid' => '',
                                       'edit-artist.name' => "\x{53f8}\x{9a6c}\x{76f8}\x{5982}",
                                       'edit-artist.period.end_date.year' => '-0127',
                                       'edit-artist.period.begin_date.day' => '',
                                       'edit-artist.period.end_date.day' => '',
                                       'edit-artist.period.ended' => '1',
                                       'edit-artist.comment' => '',
                                       'edit-artist.sort_name' => 'Sima, Xiangru',
                                       'edit-artist.type_id' => '1',
                                       'edit-artist.area.gid' => '7c81bb69-a99b-3487-b6d4-0f76d7a29ca0',
                                       'edit-artist.period.end_date.month' => '',
                                       'edit-artist.area_id' => '44',
                                       'edit-artist.period.begin_date.month' => '',
                                       'edit-artist.end_area.name' => '',
                                       'edit-artist.end_area_id' => '',
                                       'edit-artist.begin_area.name' => '',
                                       'edit-artist.begin_area_id' => '',
                                       'edit-artist.edit_note' => '',
                                       'edit-artist.gender_id' => '1',
                                       'edit-artist.area.name' => 'China'
                                     },
                'query_parameters' => {}
              };
         
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              chaban chaban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package