News for hackers. Stuff that matters.
Re:Oj – Optimized JSON in Ruby by Cieplak on Monday April 24, 2017 @11:11PM (#14190459)
Re:Oj – Optimized JSON in Ruby by noway421 on Tuesday April 25, 2017 @12:14AM (#14190723)
Indeed

>Taking an arbitrary String from a user and evaluating it is never a good idea from an unsecure source

In that case, how it is possible to implement JSON post on that for example?

Re:Oj – Optimized JSON in Ruby by mbell on Tuesday April 25, 2017 @12:52AM (#14190865)
The warnings, other than symbol GC in MRI <= 2.1, refer to using Oj in `object` mode: marshallings arbitrary Ruby object graphs to/from JSON. This is similar to pickle in python. This mode isn't what you would be using at the boundary of something like a http/json api.
Re:Oj – Optimized JSON in Ruby by viraptor on Monday April 24, 2017 @11:59PM (#14190655)
That's pretty much the same as in case of Yaml, isn't it?
Re:Oj – Optimized JSON in Ruby by jerf on Tuesday April 25, 2017 @09:59AM (#14193535)
If you are referring to the Ruby YAML vulnerability, the problem is that the deserializer ends up calling methods on the deserialized object. This says it doesn't, it merely warns you against doing it yourself, or at least doing it carelessly.
Re:Oj – Optimized JSON in Ruby by regularfry on Tuesday April 25, 2017 @04:12AM (#14191649)
Not so much. With YAML it's a feature baked into the syntax that you have to go to extra effort to avoid. With JSON, it's just a specific data schema you opt in to, so a non-aware decoder will just give you a Hash with some odd data in it.