-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Core] Hostname is not escaped before setting header #139730
Comments
Pinging @elastic/kibana-core (Team:Core) |
Some pointers: the server name comes from the
The kibana/packages/core/http/core-http-server-internal/src/lifecycle_handlers.ts Lines 66 to 71 in 84db06c
Which, in the end, is applied to the HAPI response object using the official kibana/packages/core/http/core-http-server-internal/src/lifecycle/on_pre_response.ts Lines 121 to 125 in 84db06c
So the question is: why isn't |
Given that Linux hostnames must be [a-z][0-9][-] this would be limited to running Kibana on OSX https://man7.org/linux/man-pages/man7/hostname.7.html#:~:text=Each%20element%20of%20the%20hostname,not%20start%20with%20a%20hyphen. |
We should look into a few things:
|
@lukeelmers @pgayvallet regardless of whose responsibility it is to fix, if this is easy, can we patch this on our side sooner than later? This is really confusing to folks on new machines, and those are especially folks new to the company/Kibana. |
Even if not fixed, should log something to point users in the right direction. |
@dgieselaar I'm hoping to have this addressed in the next 3 weeks -- we are meeting on Tuesday to confirm our plans for that timeframe. |
Okay, so with just a bit of investigation: The actual 'single quote' char used in the default computer name in macOS settings is not a single quote (ascii 39), but a FWIW, on macOS 10/11, this 'computer name' thing doesn't seem to be used as hostname (at least Fun thing is, when pasting this is slack, the 8217 seems to be automatically converted to 39, which leads to more misleads. Adding
to my config reproduce the issue: To unblock the dev experience, I will open a PR to remove all non-ascii characters from the default value for the |
Here, #141350 |
Lowering the impact on this issue as the short term solution in #141350 has unblocked the dev experience for now. |
The workaround is sufficient. Closing this issue |
Kibana sets the value of the
kbn-name
header to the system's hostname. If this hostname contains an invalid character (like'
), all requests will fail with a 500 status code. Example of a hostname that causes the issue:Coen's-Macbook-Local-Pro
.The text was updated successfully, but these errors were encountered: