diff --git a/includes/common.php b/includes/common.php index aa61b27..78fdf48 100644 --- a/includes/common.php +++ b/includes/common.php @@ -218,11 +218,7 @@ function verifyCsrfToken($token = null) : bool { return false; } - $success = hash_equals($_SESSION[SessionHelper::CSRF_TOKEN_KEY], $token); - - unset($_SESSION[SessionHelper::CSRF_TOKEN_KEY]); - - return $success; + return hash_equals($_SESSION[SessionHelper::CSRF_TOKEN_KEY], $token); } session_start(); diff --git a/public/admin/paste_action.php b/public/admin/paste_action.php index 8434bda..02c4ece 100644 --- a/public/admin/paste_action.php +++ b/public/admin/paste_action.php @@ -51,7 +51,7 @@ if (isset($_POST['hide'])) { $paste->save(); $redis->del('ajax_pastes'); /* Expire from Redis so it doesn't show up anymore */ - AdminLog::updateAdminHistory($current_user, AdminLog::ACTION_BLANK_PASTE, 'Paste ' . $paste->id . 'blanked.'); + AdminLog::updateAdminHistory($current_user, AdminLog::ACTION_BLANK_PASTE, 'Paste ' . $paste->id . ' blanked.'); flashSuccess('Paste contents blanked.'); }