summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'index.pl')
-rwxr-xr-xindex.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/index.pl b/index.pl
index 1af79a4..06318fa 100755
--- a/index.pl
+++ b/index.pl
@@ -1479,8 +1479,14 @@ post '/delete' => sub {
$self->render( 'account', invalid => 'csrf' );
return;
}
+
my $now = DateTime->now( time_zone => 'Europe/Berlin' )->epoch;
+
if ( $self->param('action') eq 'delete' ) {
+ if (not $self->authenticate($self->current_user->{name}, $self->param('password'))) {
+ $self->render( 'account', invalid => 'password' );
+ return;
+ }
$self->app->mark_for_deletion_query->execute( $now,
$self->current_user->{id} );
}