Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1787

Validate expiry instants

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.2.0
    • None
    • None
    • 1

    Description

      Throw if user specifies an Instant that would overflow the unsigned 32-bit expiry value in the wire protocol, or would be interpreted as a relative duration.

      Throw if a user specifies a Duration longer than 50 years.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          david.nault David Nault created issue -
          daschl Michael Nitschinger made changes -
          Field Original Value New Value
          Status New [ 10003 ] Open [ 1 ]
          daschl Michael Nitschinger made changes -
          Fix Version/s 3.1.5 [ 17434 ]
          Fix Version/s 3.1.4 [ 17405 ]
          david.nault David Nault made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          david.nault David Nault made changes -
          Fix Version/s 3.2.0 [ 17431 ]
          Fix Version/s 3.1.5 [ 17434 ]
          david.nault David Nault made changes -
          Description Complain if user specifies an Instant that would overflow the unsigned 32-bit expiry value in the wire protocol. Throw if user specifies an Instant that would overflow the unsigned 32-bit expiry value in the wire protocol.

          Throw if a user specifies a Duration longer than 50 years.
          david.nault David Nault made changes -
          Description Throw if user specifies an Instant that would overflow the unsigned 32-bit expiry value in the wire protocol.

          Throw if a user specifies a Duration longer than 50 years.
          Throw if user specifies an Instant that would overflow the unsigned 32-bit expiry value in the wire protocol, or would be interpreted as a relative duration.

          Throw if a user specifies a Duration longer than 50 years.
          david.nault David Nault added a comment - - edited

          Suggested release note text:

          The SDK now validates document expiry arguments, and rejects extreme values that would otherwise result in the document expiring earlier or later than requested. Specifically, an InvalidArgumentException is now thrown if the expiry meets any of these criteria:

               - after 2106-02-07T06:28:15Z

               - specified as a non-zero Instant before 1970-02-01T00:00:00Z

               - specified as a non-zero Duration less than 1 second or greater than 18,250 days (~50 years)

           

          david.nault David Nault added a comment - - edited Suggested release note text: The SDK now validates document expiry arguments, and rejects extreme values that would otherwise result in the document expiring earlier or later than requested. Specifically, an InvalidArgumentException is now thrown if the expiry meets any of these criteria:      - after 2106-02-07T06:28:15Z      - specified as a non-zero Instant before 1970-02-01T00:00:00Z      - specified as a non-zero Duration less than 1 second or greater than 18,250 days (~50 years)  
          david.nault David Nault made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]

          People

            david.nault David Nault
            david.nault David Nault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty