You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Poco 1.5.2-all contains a defect in Var::parseString. When the value being processed does not begin with double quotes ("), parseString treats a newline control character (\n) as part of the value rather than as a terminator. Since the JSON spec does not allow a newline control character as part of a value unless the value is a string, this is incorrect behavior.
In the example code below, the difference between the string stored in 'works' and the one stored in 'fails' is that 'works' contains a space between the 2 and the newline, while 'fails' does not. Both are valid JSON.
Current Poco 1.5.2-all contains a defect in Var::parseString. When the value being processed does not begin with double quotes ("), parseString treats a newline control character (\n) as part of the value rather than as a terminator. Since the JSON spec does not allow a newline control character as part of a value unless the value is a string, this is incorrect behavior.
In the example code below, the difference between the string stored in 'works' and the one stored in 'fails' is that 'works' contains a space between the 2 and the newline, while 'fails' does not. Both are valid JSON.
Current Poco 1.5.2-all, produces this output:
SOLUTION: Changing line 488 of Var.cpp from
to
fixes the issue, and produces the expected output:
The text was updated successfully, but these errors were encountered: