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

fix: update Secret with non-latin1 UTF-8 string #7477

Merged
merged 1 commit into from
Sep 23, 2022
Merged

fix: update Secret with non-latin1 UTF-8 string #7477

merged 1 commit into from
Sep 23, 2022

Conversation

Senorsen
Copy link
Contributor

(This is a new PR against the current refactored master)

This PR will fix #7411.

Currently, I implement the fix using a third-party library: js-base64, and its size seems okay (minified ~8kb without tree-shaking; total build size: original 251388kb -> after 251392kb, +4kb).

Another way is using the unescape and encodeURIComponent trick:

btoa(unescape(encodeURIComponent(s)))

However, considered unescape is deprecated, maybe we should avoid using it. Am I right?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 23, 2022
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Merging #7477 (7822596) into master (5d1383e) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7477      +/-   ##
==========================================
+ Coverage   42.27%   42.29%   +0.01%     
==========================================
  Files         220      220              
  Lines       12123    12123              
  Branches      179      179              
==========================================
+ Hits         5125     5127       +2     
+ Misses       6714     6711       -3     
- Partials      284      285       +1     

@maciaszczykm
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 23, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maciaszczykm, Senorsen

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 23, 2022
@k8s-ci-robot k8s-ci-robot merged commit c27b1ba into kubernetes:master Sep 23, 2022
@Senorsen Senorsen deleted the fix-secret-update-containing-non-latin1-new branch September 23, 2022 11:48
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An error occured when updating Secret with non-latin1 UTF-8 string.
3 participants