priyeshkaratha opened a new pull request, #11290:
URL: https://github.com/apache/ozone/pull/11290

   ## What changes were proposed in this pull request?
   PutBucketLifecycleConfiguration accepted a Days value that overflows a 
32-bit int (e.g. `3323232323232323232323232323232323232323232`) and returned 
HTTP 200. JAXB's built-in Integer converter silently wrapped the value, so a 
subsequent GetBucketLifecycleConfiguration returned a different, unrelated 
value (`347068064`) than what was submitted which is risking unexpected object 
expiration behavior.
   
   Bind `Expiration.Days` and 
`AbortIncompleteMultipartUpload.DaysAfterInitiation` as raw `String` in 
`S3LifecycleConfiguration` instead of `Integer`, and parse them explicitly in a 
shared `parseDays()` helper that throws
   `IllegalArgumentException` on a non-integer or out-of-range value. This 
surfaces as an `INVALID_ARGUMENT` (HTTP 400) S3 error with a message naming the 
offending value, instead of silently truncating it.
   
   ## What is the link to the Apache JIRA
   
   HDDS-16393
   
   ## How was this patch tested?
   
   Tested using added test-cases.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to