Lines 53-58
use String::Random ();
Link Here
|
53 |
use WWW::CSRF (); |
53 |
use WWW::CSRF (); |
54 |
use base qw(Class::Accessor); |
54 |
use base qw(Class::Accessor); |
55 |
use constant HMAC_SHA1_LENGTH => 20; |
55 |
use constant HMAC_SHA1_LENGTH => 20; |
|
|
56 |
use constant CSRF_EXPIRY_HOURS => 8; # 8 hours instead of 7 days.. |
56 |
|
57 |
|
57 |
=head1 METHODS |
58 |
=head1 METHODS |
58 |
|
59 |
|
Lines 161-166
sub _chk_csrf {
Link Here
|
161 |
$params->{id}, |
162 |
$params->{id}, |
162 |
$params->{secret}, |
163 |
$params->{secret}, |
163 |
$params->{token}, |
164 |
$params->{token}, |
|
|
165 |
{ MaxAge => $params->{MaxAge} // ( CSRF_EXPIRY_HOURS * 3600 ) }, |
164 |
); |
166 |
); |
165 |
return $csrf_status == WWW::CSRF::CSRF_OK(); |
167 |
return $csrf_status == WWW::CSRF::CSRF_OK(); |
166 |
} |
168 |
} |
167 |
- |
|
|