We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c5cb1 commit f123935Copy full SHA for f123935
ruby/ql/src/queries/security/cwe-352/CSRFProtectionNotEnabled.qhelp
@@ -42,6 +42,12 @@
42
vulnerability - for example if parts of the session are memoized. Calling
43
<code>protect_from_forgery with: :exception</code> can help to avoid this
44
by raising an exception on an invalid CSRF token instead.
45
+
46
+ Note that Rails version 5 and later
47
+ automatically run <code>protect_from_forgery with: :exception</code>
48
+ by default, but manually calling <code>protect_from_forgery</code> with
49
+ no <code>with</code> argument will downgrade protection to null the
50
+ session rather than raise an exception.
51
</p>
52
</recommendation>
53
0 commit comments