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

Backport of fix: consume ignored entries in CE downgrade via Ent snapshot into release/1.18.x #638

Open
3 of 4 tasks
dhiaayachi opened this issue Sep 26, 2024 · 0 comments

Comments

@dhiaayachi
Copy link
Owner

Backport

This PR is auto-generated from hashicorp#20977 to be assessed for backporting due to the inclusion of the label backport/1.18.

The below text is copied from the body of the original PR.


Description

This operation would previously fail due to unconsumed bytes in the decoder buffer when reading the Ent snapshot (the first byte of the record would be misinterpreted as a type indicator, and the remaining bytes would fail to be deserialized or read as invalid data).

Ensure restore succeeds by decoding the ignored record as an interface{}, which will consume the record bytes without requiring a concrete target struct, then moving on to the next record.

Opened in response to a bug report by @sayap (thank you)

Testing & Reproduction steps

  • Added new test to verify Ent->CE restore works as intended

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits
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

No branches or pull requests

1 participant