aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/security.md
diff options
context:
space:
mode:
authorChris Sinjakli <chris@sinjakli.co.uk>2014-09-14 12:22:29 +0200
committerChris Sinjakli <chris@sinjakli.co.uk>2014-12-15 14:51:07 +0000
commit8f8ccb9901cab457c6e1d52bdb25acf658fd5777 (patch)
treea98563a5c43183cf3a3f0ed5ddad3e73e9d88801 /guides/source/security.md
parentc308fec0f543c5b5a95bf529b5885964ae8b0f61 (diff)
downloadrails-8f8ccb9901cab457c6e1d52bdb25acf658fd5777.tar.gz
rails-8f8ccb9901cab457c6e1d52bdb25acf658fd5777.tar.bz2
rails-8f8ccb9901cab457c6e1d52bdb25acf658fd5777.zip
Don't convert empty arrays to nils when deep munging params
Diffstat (limited to 'guides/source/security.md')
-rw-r--r--guides/source/security.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/security.md b/guides/source/security.md
index b1c5b22338..b3869b1ba5 100644
--- a/guides/source/security.md
+++ b/guides/source/security.md
@@ -942,7 +942,7 @@ unless params[:token].nil?
end
```
-When `params[:token]` is one of: `[]`, `[nil]`, `[nil, nil, ...]` or
+When `params[:token]` is one of: `[nil]`, `[nil, nil, ...]` or
`['foo', nil]` it will bypass the test for `nil`, but `IS NULL` or
`IN ('foo', NULL)` where clauses still will be added to the SQL query.
@@ -953,9 +953,9 @@ request:
| JSON | Parameters |
|-----------------------------------|--------------------------|
| `{ "person": null }` | `{ :person => nil }` |
-| `{ "person": [] }` | `{ :person => nil }` |
-| `{ "person": [null] }` | `{ :person => nil }` |
-| `{ "person": [null, null, ...] }` | `{ :person => nil }` |
+| `{ "person": [] }` | `{ :person => [] }` |
+| `{ "person": [null] }` | `{ :person => [] }` |
+| `{ "person": [null, null, ...] }` | `{ :person => [] }` |
| `{ "person": ["foo", null] }` | `{ :person => ["foo"] }` |
It is possible to return to old behaviour and disable `deep_munge` configuring