Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid infinite loop in flat_object parsing #15985

Merged
merged 4 commits into from
Sep 20, 2024

Commits on Sep 19, 2024

  1. Avoid infinite loop in flat_object parsing

    We had logic in flat_object parsing that would:
    
    1. Try parsing a flat object field that is not an object or null.
    2. Would see an END_ARRAY token, ignore it, and not advance the parser.
    
    Combined, this would create a scenario where passing an array of
    strings for a flat_object would parse the string values, then loop
    infinitely on the END_ARRAY token.
    
    Signed-off-by: Michael Froh <[email protected]>
    msfroh committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    dc366c6 View commit details
    Browse the repository at this point in the history
  2. Remove some unused code and add more tests

    The removed code does not actually seem to affect the logic. Also, I
    want to be 100% sure that every call to parseToken is guaranteed to
    call parser.nextToken() at some point.
    
    Signed-off-by: Michael Froh <[email protected]>
    msfroh committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    5a74dac View commit details
    Browse the repository at this point in the history
  3. Remove unused parameter from parseToken

    Thanks for the reminder, @kkewwei!
    
    Signed-off-by: Michael Froh <[email protected]>
    msfroh committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    dff498d View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Add skip for newly-added test

    The test fails on MixedClusterClientYamlTestSuiteIT because 2.x still
    has the infinite loop until backport.
    
    Signed-off-by: Michael Froh <[email protected]>
    msfroh committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    6ddd18b View commit details
    Browse the repository at this point in the history