Description of problem: A binary file when uploaded to a secret via OCP 4.x GUI, it is not properly converted to a Base64-encoded string. Whereas in OCP 3.11 GUI/CLI, had verified that when a secret value contains non-printable characters, it is converted properly as a Base64-encoded string. Version-Release number of selected component (if applicable): 4.6 How reproducible: 100% Steps to Reproduce: 1. Login to the GUI and create a generic key value secret using a binary file. 2. Now create a generic key value secret using the same binary file through CLI. Actual results: Secrets created using same binary files are providing different Base64-encoded string. Expected results: Both CLI and GUI should provide correct Base64-encoded string for a secret based on a binary file.
I believe the underlying issue that we read the file as text, which won't work for binary files: `reader.readAsText(file, 'UTF-8')` https://github.com/spadgett/console/blob/3c1e88824e28cff26a472a95041f4c892f01b042/frontend/public/components/utils/file-input.tsx#L39
In the middle of the fixing process. Will fix next sprint.
Still working on this issue.
Jakub, Do you have any update to share on this bug please?
Hey Alex, we are still working on this issue. To be honest we have't got time to address it yet since we are on feature work. But Im confident it will get solved this sprint.
pr is up for review, will complete in upcoming sprint
Created attachment 1763852 [details] OriginalSecret
Created attachment 1763853 [details] binary file
Created attachment 1763854 [details] yaml output
retested using correct binary file and it works as intended. hence moving to verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438