Skip to content

Conversation

@mml
Copy link
Contributor

@mml mml commented Apr 13, 2017

Partial fix for #44419

kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 13, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Apr 13, 2017
@mml mml assigned monopole and wojtek-t and unassigned jimmidyson and wojtek-t Apr 13, 2017
@mml mml added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Apr 13, 2017
@mml
Copy link
Contributor Author

mml commented Apr 13, 2017

@k8s-bot unit test this

@lavalamp
Copy link
Contributor

/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 Apr 13, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lavalamp, mml

Details 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 Apr 13, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 44362, 44421, 44468, 43878, 44480)

@k8s-github-robot k8s-github-robot merged commit 079dc0d into kubernetes:master 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:]
Copy link
Contributor

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:

https://play.golang.org/p/0BV2H6OlKi

k8s-github-robot pushed a commit that referenced this pull request Apr 17, 2017
Automatic merge from submit-queue (batch tested with PRs 44519, 43194, 44513)

Use regexp instead of substring to do search and replace.

enisoc pointed out how ToLower can change (lengthen even!) the length of
a string given arbitrary input.

Follow-up to #44421 for #44419
@mml mml mentioned this pull request Apr 17, 2017
@mml mml mentioned this pull request Apr 17, 2017
mml added a commit to mml/kubernetes that referenced this pull request Apr 17, 2017
k8s-github-robot pushed a commit that referenced this pull request Apr 17, 2017
…4513-upstream-release-1.6

Automatic merge from submit-queue

Automated cherry pick of #44421 #44513

Cherry pick of #44421 #44513 on release-1.6.

#44421: Drop leading path of KUBECTL.EXE if it shows up in
#44513: Use regexp instead of substring to do search and replace.
mml added a commit to mml/kubernetes that referenced this pull request Apr 18, 2017
jessfraz added a commit that referenced this pull request Apr 19, 2017
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants