-
Notifications
You must be signed in to change notification settings - Fork 42.1k
Drop leading path of KUBECTL.EXE if it shows up in User-Agent. #44421
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
Merged
+13
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
@k8s-bot unit test this |
Contributor
|
/lgtm |
|
Automatic merge from submit-queue (batch tested with PRs 44362, 44421, 44468, 43878, 44480) |
enisoc
reviewed
Apr 14, 2017
| } | ||
| // If an old "kubectl.exe" has passed us its full path, we discard the path portion. | ||
| if exeIdx := strings.LastIndex(strings.ToLower(ua), "kubectl.exe"); exeIdx != -1 { | ||
| return ua[exeIdx:] |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can panic based on user input since strings.ToLower(ua) is not necessarily the same length in bytes as ua:
mml
added a commit
to mml/kubernetes
that referenced
this pull request
Apr 17, 2017
Backport of kubernetes#44421 kubernetes#44513 on release-1.5.
mml
added a commit
to mml/kubernetes
that referenced
this pull request
Apr 18, 2017
Backport of kubernetes#44421 kubernetes#44513 on release-1.4.
k8s-github-robot
pushed a commit
that referenced
this pull request
Apr 21, 2017
Automatic merge from submit-queue Backport of #44421 #44513 Backport of #44421 #44513 on release-1.5. #44421: Drop leading path of KUBECTL.EXE if it shows up in #44513: Use regexp instead of substring to do search and replace. ```release-note kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it. ```
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.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partial fix for #44419