On Tuesday, October 8, 2013 at 7:43 AM, Chris wrote:
Hi Chefs,I have an interesting problem that cropped up late last week and I haven't been able to figure out whats going on.There is one particular org that is throwing 'ERROR: JSON::ParserError: Unsupported `json_class` type 'Symbol'' on any node search or node edit via knife. Role searches and edits are working fine. Other orgs seem to be working fine though. I tried a node search from shef on one of the nodes in the org that returns the knife error and it worked fine.I've tried various combinations of Chef versions up though 11.6 and the latest JSON gem to no avail. Several other people on my team are running into this as well for the same org.Anyone run into this before or have any suggestions?
Your node data has somehow converted a ruby symbol object into something like:{"json_class": "Symbol", "s" => "foo"}I don't remember exactly what causes this, it might have to do with using active support or something. In any case, this behavior of the JSON gem is implicated in a security vulnerability from earlier in this year: https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/Because Chef currently relies on the old behavior of the json gem turning JSON data directly into non-core objects (like Chef::Node, role, etc.), Chef uses a whitelist to restrict what classes it supports with this behavior, and symbol is not allowed.--Daniel DeLeo
Archive powered by MHonArc 2.6.16.