File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed 
ruby/ql/src/queries/security/cwe-352 Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 5858      for example if parts of the session are memoized. Calling
5959      <code >protect_from_forgery with: :exception</code > can help to avoid this
6060      by raising an exception on an invalid CSRF token instead.
61+       Note this remains true even in Rails version 5 and later: these versions
62+       automatically run <code >protect_from_forgery with: :exception</code >
63+       by default, but manually calling <code >protect_from_forgery</code > with
64+       no <code >with</code > argument will still downgrade protection to provide an
65+       empty session rather than raise an exception.
6166    </p >
6267
6368  </example >
Original file line number Diff line number Diff line change 4242      vulnerability - for example if parts of the session are memoized. Calling
4343      <code >protect_from_forgery with: :exception</code > can help to avoid this
4444      by raising an exception on an invalid CSRF token instead.
45+ 
46+       Note that Rails versions 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 provide an empty
50+       session rather than raise an exception.
4551    </p >
4652  </recommendation >
4753
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments