rails/rails — pull request #8870 by imanel (2013-01-10 12:45:34+00:00)
Title: Revert "Strip nils from collections on JSON and XML posts dealing with empty hashes"

This change was considered as fix for [CVE-2013-0155](https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-security/t1WFuuQyavI) but is completely wrong solution for this problem.

**Rationale:**
- #8831 - incorrect delivering valid JSON that contains nils in array(a lot of APIs are using that)
- #8832 - error in `accepts_nested_attributes_for` with valid attributes
- #8845 - regression with non-object JSON content
- incorrect handling of `serialize` method([waiting for bug report](https://github.com/rails/rails/issues/8832#issuecomment-12091767))

This is not partially bypassing bug like #8862, but the only valid and working solution - allow nils in arrays as JSON specification is saying.

We should work to fix design flaw in AR instead of breaking working standards.