HDDS-16393. Reject oversized Days values in PutBucketLifecycle - #11290
Open
priyeshkaratha wants to merge 1 commit into
Open
priyeshkaratha wants to merge 1 commit into
priyeshkaratha wants to merge 1 commit into
Conversation
priyeshkaratha
force-pushed
the
HDDS-16393
branch
from
September 21, 2026 07:10
ccb7427 to
4ad8415
Compare
priyeshkaratha
force-pushed
the
HDDS-16393
branch
from
September 21, 2026 07:13
4ad8415 to
65fe7e7
Compare
priyeshkaratha
marked this pull request as ready for review
September 21, 2026 12:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.DaysandAbortIncompleteMultipartUpload.DaysAfterInitiationas rawStringinS3LifecycleConfigurationinstead ofInteger, and parse them explicitly in a sharedparseDays()helper that throwsIllegalArgumentExceptionon a non-integer or out-of-range value. This surfaces as anINVALID_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.