-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Getting logs from unicode logpath via API causes internal server error #101355
Comments
|
/sig api-machinery |
|
/assign |
|
thank you @Haleygo , please keep us posted! |
|
For clarity @matusf: are you saying that the fuzzed URL is valid or invalid UTF-8 (URL-encoded)? |
|
It's valid UTF-8 |
|
Actually, according to my test,this bug comes from http.ServeFile which replies to the request with the contents of the named file or directory. Here is my simple test below:
And since /logs is the only place use http.ServeFile, there is no other api has the same problem. So I will add a length check before calling http.ServeFile to solve this. Does that sound good to you? @matusf |
|
Maybe 400 - bad request would be more suitable response code. But I'm not a maintainer so it's not up to me to decide. |
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
|
@k8s-triage-robot: Closing this issue. In response to this:
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. |

What happened:
Hello @viralpoetry and I were fuzzing the k8s (via openapi-fuzzer) and found out following bug. Getting logs from unicode logpath via API causes internal server error. The API endpoint is
/logs/{logpath}.What you expected to happen:
Response with non-500 HTTP status code
How to reproduce it (as minimally and precisely as possible):
We were fuzzing k8s locally via minikube.
/etc/hostsasminikubecatokenEnvironment:
kubectl version):cat /etc/os-release): Ubuntu 18.04.5 LTS (bionic)uname -a): Linux pine 4.15.0-140-generic Refactor controller manager. #144-Ubuntu SMP Fri Mar 19 14:12:35 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: