Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1395

axutil_date_time_deserialize_date() allows deserialization of strings that contain the time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.6.0
    • 1.7.0
    • core/clientapi
    • None

    Description

      The axutil_date_time_deserialize_date() function deserializes the date from a string that also contains the time and does not error. For example, the following string would be deserialized, even though it is actually a dateTime, rather than a date value.

      2009-07-20T16:16:58Z

      According to the following specification, this behavior should not be allowed:

      http://www.w3.org/TR/xmlschema-2/#date

      I have included a proposed patch that fixes the issue. Basically, I search the input string for the 'T', which precedes the time portion of a dateTime value. If 'T' is found, the function returns with an error status. Let me know if there might be a better way of detecting an incorrect value in this case.

      Attachments

        1. date_time.c.diff
          0.4 kB
          Russell Tempero

        Activity

          People

            nandika Korale Gamaralalage Nandika Chandrasiri Jayawardana
            russell.tempero Russell Tempero
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified