-
Notifications
You must be signed in to change notification settings - Fork 581
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
[dev.icinga.com #12829] non-UTF-8 characters creates broken JSON #4703
Comments
Updated by gbeutner on 2016-10-04 07:30:14 +00:00 We could fix this by calling Utility::ValidateUTF8 in json.cpp:Encode. |
Updated by micke on 2016-11-29 15:06:24 +00:00 gbeutner wrote:
This also affects output via livestatus, so it would be good if a fix addresses both outputs (maybe the proposed fix will fix both problems, but it was not obvious to me that it would). |
Since I was reminded of this issue, any update? |
That referenced patch is pretty expensive on its own, I doubt that we should add it this way. |
@dnsmichi Why "pretty expensive"? (It's technically 1 LOC.) |
Look where JSON::Encode is called. That's a fundamental function and as such shouldn't be slowed down for the cost of fixing this bug. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/12829
Created by TheSeal on 2016-09-29 14:36:42 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-11-29 15:06:24 +00:00 (in Redmine)
I wrote about this on icinga-users without any response.
Since we still thinks this is a bug this is the bug rapport.
We have a check that returns non-UTF-8 characters in its output.
That seems to be just fine for Icinga since it stores the string as is
in the database. But when to access the data through the API things
break since JSON requires strict UTF-8(or higher…).
This also effects livestatus.
We will in our implementation fix this on the client side, but it would be neat if
Icinga would do the sanitation on the server side as you can't always control
the input.
The text was updated successfully, but these errors were encountered: