|
Lines 44-54
sub call {
Link Here
|
| 44 |
my $request_method = $req->method // q{}; |
44 |
my $request_method = $req->method // q{}; |
| 45 |
my $uri = $req->uri // q{}; |
45 |
my $uri = $req->uri // q{}; |
| 46 |
my $referer = $req->referer // q{No referer}; |
46 |
my $referer = $req->referer // q{No referer}; |
|
|
47 |
my $request_path = $req->path // q{}; |
| 48 |
|
| 49 |
my %path_exceptions = ( |
| 50 |
'/ilsdi.pl' => 1, |
| 51 |
); |
| 47 |
|
52 |
|
| 48 |
#NOTE: Ignore ErrorDocument requests for CSRF |
53 |
#NOTE: Ignore ErrorDocument requests for CSRF |
| 49 |
if ( $env->{'psgix.errordocument.SCRIPT_NAME'} ) { |
54 |
if ( $env->{'psgix.errordocument.SCRIPT_NAME'} ) { |
| 50 |
return $self->app->($env); |
55 |
return $self->app->($env); |
| 51 |
} |
56 |
} |
|
|
57 |
elsif ( $path_exceptions{$request_path} ){ |
| 58 |
#NOTE: Ignore path exceptions for CSRF |
| 59 |
return $self->app->($env); |
| 60 |
} |
| 52 |
|
61 |
|
| 53 |
my ($error); |
62 |
my ($error); |
| 54 |
if ( $stateless_methods{$request_method} && defined $original_op && $original_op =~ m{^cud-} ) { |
63 |
if ( $stateless_methods{$request_method} && defined $original_op && $original_op =~ m{^cud-} ) { |
| 55 |
- |
|
|