From 8bb11a59629d59aa85a0b429f6e51138b57e501d Mon Sep 17 00:00:00 2001 From: Giuseppe Arcifa Date: Mon, 28 Oct 2024 16:01:25 +0100 Subject: [PATCH] Fix: preveneted PHP 8.2 deprecated 'FILTER_SANITIZE_STRING' --- includes/SSO_AJAX_Handler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/SSO_AJAX_Handler.php b/includes/SSO_AJAX_Handler.php index f915028..a310b4e 100644 --- a/includes/SSO_AJAX_Handler.php +++ b/includes/SSO_AJAX_Handler.php @@ -25,7 +25,7 @@ public function __construct() { * Handle SSO login attempts. */ public function login() { - SSO_Helpers::handleLogin( filter_input( INPUT_GET, 'token', FILTER_SANITIZE_STRING ) ); + SSO_Helpers::handleLogin( htmlspecialchars( strip_tags( filter_input( INPUT_GET, 'token' ) ) ) ); } /** @@ -33,8 +33,8 @@ public function login() { */ public function legacyLogin() { - $nonce = filter_input( INPUT_GET, 'nonce', FILTER_SANITIZE_STRING ); - $salt = filter_input( INPUT_GET, 'salt', FILTER_SANITIZE_STRING ); + $nonce = htmlspecialchars( strip_tags( filter_input( INPUT_GET, 'nonce' ) ) ); + $salt = htmlspecialchars( strip_tags( filter_input( INPUT_GET, 'salt' ) ) ); SSO_Helpers_Legacy::handleLegacyLogin( $nonce, $salt ); }