JSON: Incorrect unescaped character in string

General discussions and questions.
Post Reply
pfranz
Posts: 5
Joined: Fri Jan 05, 2018 6:37 am

JSON: Incorrect unescaped character in string

Post by pfranz »

We occasionally have typos in things like hostmasks that seem to bring the whole server down.

Code: Select all

ERROR Thu 24 Oct 07:14.00: JSON: Incorrect unescaped character in string (at character 156 of 202):
                                                  !
k_ids":[0], "params":{ "hosts_mask":"sdoshi 8:40 PM (rn1|rn2|rn3|rn4|rn5|rn6|rn7|rn8|rn9).*"} }
I'm following up on an issue that was handled by someone else, so I don't have all the details. a) Any suggestions for sanitizing data before submitting (regexing a regex sounds like a challenge) b) can this be more gracefully handled on the server side?
CGRU 2.2.3, CentOS 7.2.1511 / 7.6.1810
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: JSON: Incorrect unescaped character in string

Post by timurhai »

Hi.

You should always specify CGRU version and OS.
You can use signature for it (like me).

Can you specify needed actions to perform this error and make server down?
I need to repeat bug on my side.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
pfranz
Posts: 5
Joined: Fri Jan 05, 2018 6:37 am

Re: JSON: Incorrect unescaped character in string

Post by pfranz »

I definitely should have included that in the original post. Profile updated. In this case the server is running CentOS 7.2.1511. The client submitting the job CentOS 7.6.1810. Both using CGRU 2.2.3.

Let me know if you'd like a more step by step repro.
CGRU 2.2.3, CentOS 7.2.1511 / 7.6.1810
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: JSON: Incorrect unescaped character in string

Post by timurhai »

Hi.
Yes i need step by step instructions to reproduce the bug.
For now i even do not see the entire JSON message to send.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: JSON: Incorrect unescaped character in string

Post by timurhai »

O! I noticed that you are using an old version.
See http://cgru.info/changes_log#release230 bug fixes.
There was such bug.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
pfranz
Posts: 5
Joined: Fri Jan 05, 2018 6:37 am

Re: JSON: Incorrect unescaped character in string

Post by pfranz »

Thanks! That's great to hear. I'll dig into what's holding us back from upgrading.
CGRU 2.2.3, CentOS 7.2.1511 / 7.6.1810
Post Reply