diff --git a/frontend.pm b/frontend.pm index 363c6e7..e4e694d 100644 --- a/frontend.pm +++ b/frontend.pm @@ -326,7 +326,7 @@ sub redirect { my $aClient = $_[0]; my $aLocation = $_[1]; - my $response = getBaseResponse(301, "Moved Permanently"); + my $response = getBaseResponse(307, "Temporary Redirect"); $response.="Content-Length: 0\r\n"; $response.="Location: $aLocation\r\n"; $aClient->send($response); diff --git a/frontend_routes.pm b/frontend_routes.pm index 0656f22..d8988a8 100644 --- a/frontend_routes.pm +++ b/frontend_routes.pm @@ -256,8 +256,7 @@ sub handlePath { $query->execute($session->{"username"}); my @row = $query->fetchrow_array(); my $password = $row[0]; - my $hashedPassword = Digest::SHA::sha256_hex($password); - if($hashedPassword ne $password) { + if($password ne Digest::SHA::sha256_hex($parameters{"currentPassword"})) { frontend::sendBadRequest($aClient, "Wrong password"); return 1; }