diff options
author | Faruk AYDIN <omerfaruk26@gmail.com> | 2015-05-09 17:33:37 +0300 |
---|---|---|
committer | Faruk AYDIN <omerfaruk26@gmail.com> | 2015-05-09 17:36:05 +0300 |
commit | a834c64a75481dc62416bfb9f81834e5fe028ffe (patch) | |
tree | 400f586613fe7ec9660929fd5cb571856581a07d | |
parent | 684bbe86cd320549804cb92d4d325e77305b1498 (diff) | |
download | rails-a834c64a75481dc62416bfb9f81834e5fe028ffe.tar.gz rails-a834c64a75481dc62416bfb9f81834e5fe028ffe.tar.bz2 rails-a834c64a75481dc62416bfb9f81834e5fe028ffe.zip |
promote :except option instead of :only for before action docs [ci skip]
-rw-r--r-- | guides/source/security.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/security.md b/guides/source/security.md index 390375b75d..a464b83838 100644 --- a/guides/source/security.md +++ b/guides/source/security.md @@ -572,7 +572,7 @@ NOTE: _When sanitizing, protecting or verifying something, prefer whitelists ove 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 before_action except: [...] instead of only: [...] for security-related actions. This way you don't forget to enable security checks for newly added actions. * 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>", "") |