Control confirm stamp before decrypting it (#207)
This commit is contained in:
parent
2f4b218488
commit
e759219371
@ -1290,8 +1290,13 @@ sub process {
|
|||||||
sub controlUrlOrigin {
|
sub controlUrlOrigin {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
if ( my $c = $self->param('confirm') ) {
|
if ( my $c = $self->param('confirm') ) {
|
||||||
|
|
||||||
|
# Replace confirm stamp by 1 or -1
|
||||||
$c =~ s/^(-?)(.*)$/${1}1/;
|
$c =~ s/^(-?)(.*)$/${1}1/;
|
||||||
if ( $self->{cipher} ) {
|
|
||||||
|
# Decrypt confirm stamp if cipher available
|
||||||
|
# and confirm not already decrypted
|
||||||
|
if ( $self->{cipher} and $2 ne "1" ) {
|
||||||
my $time = time() - $self->{cipher}->decrypt($2);
|
my $time = time() - $self->{cipher}->decrypt($2);
|
||||||
if ( $time < 600 ) {
|
if ( $time < 600 ) {
|
||||||
$self->lmLog( "Confirm parameter accepted $c", 'debug' );
|
$self->lmLog( "Confirm parameter accepted $c", 'debug' );
|
||||||
|
Loading…
Reference in New Issue
Block a user