mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
remove Mass Assignment reference from Security Guide [ci skip]
This commit is contained in:
parent
336bbb17e3
commit
46d63d5b20
1 changed files with 0 additions and 1 deletions
|
@ -554,7 +554,6 @@ NOTE: _When sanitizing, protecting or verifying something, whitelists over black
|
|||
A blacklist can be a list of bad e-mail addresses, non-public actions or bad HTML tags. This is opposed to a whitelist which lists the good e-mail addresses, public actions, good HTML tags and so on. Although sometimes it is not possible to create a whitelist (in a SPAM filter, for example), _prefer to use whitelist approaches_:
|
||||
|
||||
* Use before_action only: [...] instead of except: [...]. This way you don't forget to turn it off for newly added actions.
|
||||
* Use attr_accessible instead of attr_protected. See the mass-assignment section for details
|
||||
* Allow <strong> instead of removing <script> against Cross-Site Scripting (XSS). See below for details.
|
||||
* Don't try to correct user input by blacklists:
|
||||
* This will make the attack work: "<sc<script>ript>".gsub("<script>", "")
|
||||
|
|
Loading…
Reference in a new issue