Lines 91-97
C<$req> must be a Mojo::Message::Request object
Link Here
|
91 |
sub is_csrf_valid { |
91 |
sub is_csrf_valid { |
92 |
my ( $self, $req ) = @_; |
92 |
my ( $self, $req ) = @_; |
93 |
|
93 |
|
94 |
my $csrf_token = $req->param('csrf_token') || $req->headers->header('CSRF_TOKEN'); |
94 |
my $csrf_token = $req->param('csrf_token') || $req->headers->header('CSRF-TOKEN'); |
95 |
my $cookie = $req->cookie('CGISESSID'); |
95 |
my $cookie = $req->cookie('CGISESSID'); |
96 |
if ( $csrf_token && $cookie ) { |
96 |
if ( $csrf_token && $cookie ) { |
97 |
my $session_id = $cookie->value; |
97 |
my $session_id = $cookie->value; |
98 |
- |
|
|