Skip to content

NIFI-16315 Reject oversized PutUDP FlowFiles before copying content - #11642

Merged
exceptionfactory merged 3 commits into
mainfrom
NIFI-16315
Sep 10, 2026
Merged

exceptionfactory merged 3 commits into
mainfrom
NIFI-16315

Conversation

@joewitt

@joewitt joewitt commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

NIFI-16315

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

return;
}

if (flowFile.getSize() > MAX_IPV4_UDP_PAYLOAD_LENGTH) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this limit account for the destination address family? IPv6 supports UDP payloads up to 65,527 bytes, so this check rejects some payloads that PutUDP can currently send to IPv6 destinations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm - good point. will look into that.

@exceptionfactory exceptionfactory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to the changes in this pull request, but it makes me think we should consider deprecating this Processor.

@joewitt

joewitt commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Got ya @exceptionfactory i'll create another PR for that as well because I totally agree. This processor is pretty nonsensical (now...when it was first used...kinda cool)

@exceptionfactory

Copy link
Copy Markdown
Contributor

Got ya @exceptionfactory i'll create another PR for that as well because I totally agree. This processor is pretty nonsensical (now...when it was first used...kinda cool)

I opened PR #11649 to deprecate PutUDP for removal.

@exceptionfactory exceptionfactory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates @joewitt, the functional changes look good.

Given that this Processor is now deprecated, I don't think the new Test class is needed, so I would prefer to remove it and just keep the minor update to TestPutUDP.

joewitt and others added 3 commits September 9, 2026 17:55
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Retain the oversized payload coverage in TestPutUDP and remove the standalone test class following deprecation of the processor.

Co-authored-by: Cursor <cursoragent@cursor.com>
@joewitt

joewitt commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the updates @joewitt, the functional changes look good.

Given that this Processor is now deprecated, I don't think the new Test class is needed, so I would prefer to remove it and just keep the minor update to TestPutUDP.

understood - new commit should achieve that. also rebased given deprecation

@exceptionfactory exceptionfactory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for removing the extra test @joewitt, the latest version looks good.

@exceptionfactory
exceptionfactory merged commit 69a5e03 into main Sep 10, 2026
22 of 23 checks passed
@pvillard31
pvillard31 deleted the NIFI-16315 branch September 10, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants