Skip to content

[release-4.21] OCPBUGS-85674: Prevent binary secret data corruption when editing#16448

Open
TheRealJon wants to merge 1 commit into
openshift:release-4.21from
TheRealJon:OCPBUGS-85674
Open

[release-4.21] OCPBUGS-85674: Prevent binary secret data corruption when editing#16448
TheRealJon wants to merge 1 commit into
openshift:release-4.21from
TheRealJon:OCPBUGS-85674

Conversation

@TheRealJon
Copy link
Copy Markdown
Member

Manual backport of #16435

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels May 14, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b15b807e-7fcc-49df-acf0-269d619dc67d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@TheRealJon: This pull request references Jira Issue OCPBUGS-70273, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "5.0.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead
  • expected Jira Issue OCPBUGS-70273 to depend on a bug targeting a version in 4.22.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Manual backport of #16435

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label May 14, 2026
@openshift-ci openshift-ci Bot requested review from jhadvig and rhamilto May 14, 2026 19:36
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 14, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added component/core Related to console core functionality component/shared Related to console-shared approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cypress Related to Cypress e2e integration testing labels May 14, 2026
@TheRealJon TheRealJon changed the title OCPBUGS-70273: Prevent binary secret data corruption when editing [release-4.21] OCPBUGS-70273: Prevent binary secret data corruption when editing May 14, 2026
@TheRealJon TheRealJon changed the title [release-4.21] OCPBUGS-70273: Prevent binary secret data corruption when editing [release-4.21] OCPBUGS-85674: Prevent binary secret data corruption when editing May 14, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@TheRealJon: This pull request references Jira Issue OCPBUGS-85674, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Manual backport of #16435

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

When editing secrets containing binary data (JAR, JCEKS, etc), the
binary values were being corrupted by decoding base64 as UTF-8 text,
which inserts replacement characters for non-printable bytes.

Fixed by:
- Pass base64 data directly to DroppableFileInput for binary entries
- Add isBase64Input prop to properly handle base64-encoded input
- Preserve original binary values when form updates to prevent corruption
- Use useMemo instead of useState for derived binaryData value
- Use immutable reducer pattern to merge binary data

Added Cypress test to verify editing text fields doesn't corrupt
binary data in the same secret.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated label May 15, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 15, 2026

@TheRealJon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/frontend 0b0bf17 link true /test frontend
ci/prow/e2e-gcp-console 0b0bf17 link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/shared Related to console-shared jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants