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

Remove 0,1,3 from rand.String to avoid 'bad words' #50070

Merged

Conversation

dixudx
Copy link
Member

@dixudx dixudx commented Aug 3, 2017

What this PR does / why we need it:

Remove 0,1,3 from the runes to prevent accidental bad words profanity

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #49543

Special notes for your reviewer:
/cc @mml @jamesawebb1 @spiffxp

Release note:

Remove 0,1,3 from rand.String, to avoid 'bad words'

@k8s-ci-robot
Copy link
Contributor

@dixudx: GitHub didn't allow me to request PR reviews from the following users: jamesawebb1.

Note that only kubernetes members can review this PR, and authors cannot review their own PRs.

In response to this:

What this PR does / why we need it:

Remove 0,1,3 from the runes to prevent accidental bad words profanity

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #49543

Special notes for your reviewer:
/cc @mml @jamesawebb1 @spiffxp

Release note:

Remove 0,1,3 from rand.String, to avoid 'bad words'

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 3, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @dixudx. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

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/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 3, 2017
@deads2k
Copy link
Contributor

deads2k commented Aug 3, 2017

I feel like I should require a good story every time someone wants to remove items from the list. The "I was demo-ing to customer X and this one popped up" must be awesome.

@dixudx
Copy link
Member Author

dixudx commented Aug 3, 2017

@deads2k Because it generated some offensive string like nginx-ingress-controller-1449474453-c0ck5.

@mml
Copy link
Contributor

mml commented Aug 3, 2017

/lgtm

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 3, 2017
@mml
Copy link
Contributor

mml commented Aug 3, 2017

/ok-to-test

@deads2k
Copy link
Contributor

deads2k commented Aug 3, 2017

@deads2k Because it generated some offensive string like nginx-ingress-controller-1449474453-c0ck5.

Heh. That's an unlucky demo. :)

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, dixudx, mml

Associated issue: 49543

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 46685, 49863, 50098, 50070, 50096)

@k8s-github-robot k8s-github-robot merged commit 704cc7f into kubernetes:master Aug 4, 2017
@dixudx dixudx deleted the remove_013_to_avoid_bad_words branch August 4, 2017 07:30
@tedyu
Copy link
Contributor

tedyu commented Jan 6, 2020

@dixudx
Can you show me a bad string consisting of '3' ?

The reason I ask this question is that, according to BenchmarkRandomStringGeneration, addition of digit(s) would make the random number generator faster.

I agree about '0' and '1' being similar to 'o' and 'i'.
But I don't agree about '3'.

Thanks

@mml
Copy link
Contributor

mml commented Jan 6, 2020

@tedyu see #49543 (comment)

@tedyu
Copy link
Contributor

tedyu commented Jan 6, 2020

@mml
I don't see bad word example in that comment.
We should also be aware of performance implication w.r.t. removal of digits.

@liggitt
Copy link
Member

liggitt commented Jan 6, 2020

I don't see bad word example in that comment.

"3xt3nd" was an example of how the number 3 makes words readable as english.

We should also be aware of performance implication w.r.t. removal of digits.

has that been demonstrated to be a problematic hotspot in a profile?

@2rs2ts
Copy link
Contributor

2rs2ts commented Mar 1, 2022

Sorry to necro this. I was wondering if we should also remove 4, since that's often used as a substitute for A in leetspeak, in the same way that 0 subs for O, 1 for I, and 3 for E. I was going to open an issue about this instead, but it didn't seem like it fit into any of the issue categories (not a bug, there's no KEP for it, etc...)

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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Pod suffix is b0110ck5
8 participants