Commit 63311c5
Use protect_from_forgery with: :exception (#6926)
Use protect_from_forgery with: :exception (#6920)
CodeQL alert #60 (rb/csrf-protection-disabled, CWE-352): calling
protect_from_forgery with no with: argument downgrades the failure
mode to with: :null_session, weaker than the Rails 5+ default of
with: :exception that ActionController::Base would otherwise apply.
Make the strategy explicit so the call no longer weakens the default,
matching option 2 from the issue (more self-documenting than removing
the call entirely).
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>1 parent 813e04e commit 63311c5
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments