Skip to content

[release-4.20] OCPBUGS-87835: Prevent binary secret data corruption when editing#16571

Open
TheRealJon wants to merge 1 commit into
openshift:release-4.20from
TheRealJon:OCPBUGS-87835
Open

[release-4.20] OCPBUGS-87835: Prevent binary secret data corruption when editing#16571
TheRealJon wants to merge 1 commit into
openshift:release-4.20from
TheRealJon:OCPBUGS-87835

Conversation

@TheRealJon

Copy link
Copy Markdown
Member

Manual backport of #16448

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-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 Jun 8, 2026
@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.20." or "openshift-4.20.", 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.21.0, 4.21.z 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 #16448

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 Jun 8, 2026
@openshift-ci openshift-ci Bot requested review from rhamilto and spadgett June 8, 2026 18:31
@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Jun 8, 2026
@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

[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/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 kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Jun 8, 2026
@TheRealJon TheRealJon changed the title [release-4.20] OCPBUGS-70273: Prevent binary secret data corruption when editing [release-4.20] OCPBUGS-87835: Prevent binary secret data corruption when editing Jun 8, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

  • expected Jira Issue OCPBUGS-87835 to depend on a bug targeting a version in 4.21.0, 4.21.z 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 #16448

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.

@TheRealJon

Copy link
Copy Markdown
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 8, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@TheRealJon: This pull request references Jira Issue OCPBUGS-87835, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-85674 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-85674 targets the "4.21.z" version, which is one of the valid target versions: 4.21.0, 4.21.z
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Jira (yapei@redhat.com), skipping review request.

Details

In response to this:

/jira refresh

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.

@TheRealJon

Copy link
Copy Markdown
Member Author

/label backport-risk-assessed
/verified by CI

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jun 8, 2026
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 8, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@TheRealJon: This PR has been marked as verified by CI.

Details

In response to this:

/label backport-risk-assessed
/verified by CI

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

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@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 1e3ebf1 link true /test frontend
ci/prow/e2e-gcp-console 1e3ebf1 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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. component/core Related to console core functionality component/shared Related to console-shared jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid 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 verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants