Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4441

Fix validation of dates

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 1.2.0 beta 1
    • Component/s: None
    • Labels:
      None
    • Severity:
      Low

      Description

      Our date validation (timestamp type) doesn't validate that the date is correct, i.e. it allows dates like 2011-42-42, because DateUtils.parseDate() doesn't do the validation (don't ask me how it can generate a timestamp from bogus date, apparently it can).

      The easy fix is to use DateUtils.parseDateStrictly(), which does the validation. This does require to update commons-lang to >= 2.5 (we have 2.4).

        Attachments

        1. 4441.txt
          0.9 kB
          Sylvain Lebresne

          Activity

            People

            • Assignee:
              slebresne Sylvain Lebresne
              Reporter:
              slebresne Sylvain Lebresne
              Authors:
              Sylvain Lebresne
              Reviewers:
              Jonathan Ellis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: