diff --git a/ruby/ql/src/queries/security/cwe-352/CSRFProtectionNotEnabled.qhelp b/ruby/ql/src/queries/security/cwe-352/CSRFProtectionNotEnabled.qhelp index 9b8944b1d65..5af4be5c7ec 100644 --- a/ruby/ql/src/queries/security/cwe-352/CSRFProtectionNotEnabled.qhelp +++ b/ruby/ql/src/queries/security/cwe-352/CSRFProtectionNotEnabled.qhelp @@ -42,6 +42,12 @@ vulnerability - for example if parts of the session are memoized. Calling protect_from_forgery with: :exception can help to avoid this by raising an exception on an invalid CSRF token instead. + + Note that Rails version 5 and later + automatically run protect_from_forgery with: :exception + by default, but manually calling protect_from_forgery with + no with argument will downgrade protection to null the + session rather than raise an exception.