[icinga-checkins] icinga.org: icinga-core/tdressler/sqlite: classic-ui: fixed UNICODE characters in JSON output from getting discarded #4193

git at icinga.org git at icinga.org
Wed May 22 20:54:52 CEST 2013


Module: icinga-core
Branch: tdressler/sqlite
Commit: 5a6ce3bf032a5e9b1780772dda863e7e19a500a5
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=5a6ce3bf032a5e9b1780772dda863e7e19a500a5

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Fri May 17 21:26:04 2013 +0200

classic-ui: fixed UNICODE characters in JSON output from getting discarded #4193

function "json_encode" should handle unicode characters no properly

refs: #4193

---

 Changelog      |    6 ++++++
 cgi/cgiutils.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Changelog b/Changelog
index e562a6b..42d24c7 100644
--- a/Changelog
+++ b/Changelog
@@ -13,6 +13,12 @@ UPGRADE NOTES
 	- idoutils: ${source}/module/idoutils/config/updates
 * package locations may differ!
 
+1.9.1 - ??/??/????
+
+FIXES
+* classic ui: fixed UNICODE characters in JSON output from getting discarded #4193 - RB
+
+
 1.9.0 - 07/05/2013
 
 NOTES
diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index dbc8c83..5cdbc25 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -3295,7 +3295,7 @@ char *json_encode(char *input) {
 			encoded_string[j++] = 'n';
 
 		/* ignore control caracters */
-		} else if (input[i] < 32 || input[i] == 127) {
+		} else if ((input[i] > 1 && input[i] < 32) || input[i] == 127) {
 			continue;
 
 		} else





More information about the icinga-checkins mailing list