kubernetes/pkg/kubectl
Kubernetes Submit Queue 6acfda8a85
Merge pull request #64573 from juanvallejo/jvallejo/remove-extraneous-path-shortcuts
Automatic merge from submit-queue (batch tested with PRs 64613, 64596, 64573, 64154, 64639). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove extra "../" when copying from pod to local

**Release note**:
```release-note
NONE
```

Copying via `kubectl cp` from a pod to local will no longer panic if any received tar headers contain an extra "../". This can happen when specifying a remote location beyond "/" - for example:

```
# I am attempting to go backwards beyond "/"
$ kubectl cp mypod:/one/two/../../../etc/hosts ./
```

The above command results in a tar header containing an extra "../" in its name (../etc/hosts), causing a panic [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cp.go#L388).

Related downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1584555

cc @soltysh
2018-06-02 06:30:16 -07:00
..
apply fix a small mistake in function getFieldMeta 2018-05-09 11:14:57 +08:00
apps Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
cmd Merge pull request #64573 from juanvallejo/jvallejo/remove-extraneous-path-shortcuts 2018-06-02 06:30:16 -07:00
explain simplify api registration 2018-05-08 18:33:50 -04:00
genericclioptions Merge pull request #64453 from deads2k/cli-73-resourcebuidlerflags 2018-05-30 08:42:29 -07:00
metricsutil kubectl: Use metrics-server for kubectl top commands 2018-01-22 21:45:06 +01:00
plugins use IOStreams for cli commands 2018-05-08 09:02:34 -04:00
polymorphichelpers Move unrelated methods from the factory to helper 2018-05-24 11:42:26 +08:00
proxy Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
scheme simplify api registration 2018-05-08 18:33:50 -04:00
util cleanup some dead kubectl code and narrow scope of helpers 2018-05-29 12:44:53 -04:00
validation Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
.import-restrictions Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
apply.go remove confusing flexibility for metadata interpretation 2018-04-23 13:31:55 -04:00
autoscale.go refactor kubectl autoscale to use the new generator 2017-11-20 14:12:20 +08:00
autoscale_test.go pkg/util/pointer: Update int pointer functions 2018-03-27 10:30:01 -04:00
BUILD move filename flags to genericclioptions 2018-05-28 11:09:51 +02:00
clusterrolebinding.go add UT for pkg/kubecl clusterrolebinding 2017-08-28 15:13:15 +08:00
clusterrolebinding_test.go add UT for pkg/kubecl clusterrolebinding 2017-08-28 15:13:15 +08:00
conditions.go segregate job scaling from everything else 2018-04-05 10:24:34 -04:00
configmap.go Add support for binary file in configmap 2018-01-23 07:28:34 -05:00
configmap_test.go Add support for binary file in configmap 2018-01-23 07:28:34 -05:00
deployment.go Add basic generator for apps/v1 deployment 2018-04-11 00:44:29 +05:30
deployment_test.go Add basic generator for apps/v1 deployment 2018-04-11 00:44:29 +05:30
doc.go kubectl: rewrite docstrings in several files 2017-06-23 09:49:30 -07:00
env_file.go fix all the typos across the project 2018-02-11 11:04:14 +08:00
env_file_test.go kubectl: refactor addFromEnvFile, write tests 2017-06-23 09:49:30 -07:00
generate.go UTs for pkg/kubectl generate_test.go 2017-08-03 21:34:03 +08:00
generate_test.go UTs for pkg/kubectl generate_test.go 2017-08-03 21:34:03 +08:00
history.go kubectl: Use apps/v1 Deployment/ReplicaSet. 2018-05-22 13:43:06 -07:00
history_test.go Refactor HistoryViewerFor to use Visitor design pattern 2017-11-09 08:11:19 +00:00
interfaces.go find and replace 2017-01-20 08:04:53 -05:00
namespace.go Remove kubectl create namespace dependencies on kubernetes/pkg/api 2017-10-25 20:26:11 +08:00
namespace_test.go Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
OWNERS Revert "update kubectl approvers" 2017-01-25 17:32:22 -08:00
pdb.go Print type representation on errors when checking parameter types 2017-11-01 10:36:17 +01:00
pdb_test.go Print type representation on errors when checking parameter types 2017-11-01 10:36:17 +01:00
priorityclass.go add create subcommand for priorityclass 2017-11-07 15:03:01 +08:00
priorityclass_test.go add create subcommand for priorityclass 2017-11-07 15:03:01 +08:00
quota.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
quota_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
rolebinding.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
rolebinding_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
rollback.go kubectl: Use apps/v1 Deployment/ReplicaSet. 2018-05-22 13:43:06 -07:00
rollback_test.go Replace type switches in Rollback with Visitor pattern 2017-11-19 17:46:57 +00:00
rolling_updater.go Use DeleteOptions.PropagationPolicy instead of OrphanDependents (deprecated) in kubectl 2018-05-23 16:59:53 +10:00
rolling_updater_test.go update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
rollout_status.go include rollout object name in cli message 2018-05-29 18:07:41 +08:00
rollout_status_test.go include rollout object name in cli message 2018-05-29 18:07:41 +08:00
run.go remove punctuation from the end of an error string 2017-11-21 12:43:48 +05:30
run_test.go Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
scale.go segregate job scaling from everything else 2018-04-05 10:24:34 -04:00
scale_test.go Remove kubectl reapers 2018-05-25 22:18:05 +02:00
secret.go remove versioned printer 2018-05-17 17:20:54 -04:00
secret_for_docker_registry.go add --from-file flag to docker-registry secret 2018-03-21 11:13:11 -04:00
secret_for_docker_registry_test.go Fix problem accessing private docker registries 2017-12-20 12:37:40 -05:00
secret_for_tls.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
secret_for_tls_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
secret_test.go remove versioned printer 2018-05-17 17:20:54 -04:00
service.go remove dependency from service generator 2017-10-31 15:35:36 +08:00
service_basic.go Make sure the ports is valid when parsing portString 2017-11-13 20:46:05 +08:00
service_basic_test.go fix failed verify misspell err 2018-03-20 11:16:51 +08:00
service_test.go remove dependency from service generator 2017-10-31 15:35:36 +08:00
serviceaccount.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
serviceaccount_test.go switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
sorter.go Merge pull request #62025 from hanxiaoshuai/bugfix0402 2018-05-22 08:40:16 -07:00
sorter_test.go check error when parse field failed 2018-04-19 10:02:28 +08:00