From b5b47bef14c13f8a553b55370b73783b627e058f Mon Sep 17 00:00:00 2001 From: Victor Emanouilov Date: Tue, 10 Oct 2023 15:56:29 +0300 Subject: [PATCH] fix imap server deletion sanitizing server IDs - could be alphanum and not strictly int --- modules/imap/setup.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/imap/setup.php b/modules/imap/setup.php index 16a4c9f071..05b83d6bb5 100644 --- a/modules/imap/setup.php +++ b/modules/imap/setup.php @@ -342,7 +342,7 @@ 'imap_expanded_folder_path' => array(FILTER_SANITIZE_FULL_SPECIAL_CHARS, false), 'imap_expanded_folder_formatted' => array(FILTER_UNSAFE_RAW, false), 'imap_server_ids' => array(FILTER_SANITIZE_FULL_SPECIAL_CHARS, false), - 'imap_server_id' => array(FILTER_VALIDATE_INT, false), + 'imap_server_id' => array(FILTER_SANITIZE_FULL_SPECIAL_CHARS, false), 'combined_inbox_server_ids' => array(FILTER_SANITIZE_FULL_SPECIAL_CHARS, false), 'imap_delete_error' => array(FILTER_VALIDATE_BOOLEAN, false), 'move_count' => array(FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY), @@ -351,7 +351,7 @@ ), 'allowed_get' => array( - 'imap_server_id' => FILTER_VALIDATE_INT, + 'imap_server_id' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, 'imap_download_message' => FILTER_VALIDATE_BOOLEAN, 'imap_remove_attachment' => FILTER_VALIDATE_BOOLEAN, 'imap_show_message' => FILTER_VALIDATE_BOOLEAN, @@ -361,7 +361,7 @@ 'allowed_post' => array( 'server_port' => FILTER_VALIDATE_INT, 'server' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, - 'imap_server_id' => FILTER_VALIDATE_INT, + 'imap_server_id' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, 'imap_server_ids' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, 'imap_user' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, 'imap_pass' => FILTER_UNSAFE_RAW,