Skip to content

Reject invalid foreach loop params#221

Open
fallintoplace wants to merge 1 commit into
Netflix:mainfrom
fallintoplace:fix-invalid-loop-params
Open

Reject invalid foreach loop params#221
fallintoplace wants to merge 1 commit into
Netflix:mainfrom
fallintoplace:fix-invalid-loop-params

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • Return a bad request when loopParams cannot be URL-safe base64 decoded or parsed as JSON.
  • Preserve the current unfiltered behavior for omitted or empty loopParams.
  • Add controller coverage for valid filters, invalid base64, and invalid JSON.

Why

Malformed loopParams were previously logged and then passed to the DAO as null. The DAO treats null as no filter, so a bad filter could silently broaden the result set.

Validation

  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./gradlew :maestro-extensions:test --tests com.netflix.maestro.extensions.controllers.ForeachFlattenControllerTest
  • JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home ./gradlew :maestro-extensions:spotlessCheck :maestro-extensions:checkstyleMain :maestro-extensions:pmdMain

I also tried :maestro-extensions:check; local Docker/Testcontainers was unavailable for the DAO test, and SpotBugs reported existing findings in unrelated extension files.

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.

1 participant