File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 8
8
// Here are the basic overloaded method definitions
9
9
// The wrapper must be set BEFORE onreadystatechange is written to, since
10
10
// a bug in ActiveXObject prevents us from properly testing for it.
11
- CsrfMagic = function ( real ) {
11
+ // "use strict";
12
+ var CsrfMagic = function ( real ) {
12
13
// try to make it ourselves, if you didn't pass it
13
14
if ( ! real ) try { real = new XMLHttpRequest ; } catch ( e ) { ; }
14
15
if ( ! real ) try { real = new ActiveXObject ( 'Msxml2.XMLHTTP' ) ; } catch ( e ) { ; }
@@ -101,9 +102,9 @@ CsrfMagic.process = function(base) {
101
102
CsrfMagic . end = function ( ) {
102
103
// This rewrites forms AGAIN, so in case buffering didn't work this
103
104
// certainly will.
104
- forms = document . getElementsByTagName ( 'form' ) ;
105
+ const forms = document . getElementsByTagName ( 'form' ) ;
105
106
for ( var i = 0 ; i < forms . length ; i ++ ) {
106
- form = forms [ i ] ;
107
+ const form = forms [ i ] ;
107
108
if ( form . method . toUpperCase ( ) !== 'POST' ) continue ;
108
109
if ( form . elements [ csrfMagicName ] ) continue ;
109
110
var input = document . createElement ( 'input' ) ;
You can’t perform that action at this time.
0 commit comments