|
Lines 50-56
sub check_csrf_in_forms {
Link Here
|
| 50 |
for my $line (@lines) { |
50 |
for my $line (@lines) { |
| 51 |
$line_number++; |
51 |
$line_number++; |
| 52 |
$open = $line_number if $line =~ m{<form.*method=('|")post('|")}i; |
52 |
$open = $line_number if $line =~ m{<form.*method=('|")post('|")}i; |
| 53 |
$found++ if $open && $line =~ m{csrf-token\.inc}; |
53 |
$found++ |
|
|
54 |
if $open && $line =~ m{csrf-token\.inc} |
| 55 |
|| $line =~ m{<input type="hidden" name="csrf_token" value="\$\{csrf_token\}" />}; |
| 54 |
if ( $open && $line =~ m{</form} ) { |
56 |
if ( $open && $line =~ m{</form} ) { |
| 55 |
push @errors, $open unless $found; |
57 |
push @errors, $open unless $found; |
| 56 |
$found = 0; |
58 |
$found = 0; |
| 57 |
- |
|
|