From 461eda6c2c3922869a6134c84877a310808f0a96 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 20 Apr 2004 16:55:41 +0000 Subject: [PATCH] prohibit message sets other then a single id when fetching a single message. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7181 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_messages.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/imap_messages.php b/functions/imap_messages.php index db11da03..583b5537 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -711,7 +711,8 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $show_num=false) * See the documentation folder for more information about this array. */ function sqimap_get_message ($imap_stream, $id, $mailbox) { - + // typecast to int to prohibit 1:* msgs sets + $id = (int) $id; $flags = array(); $read = sqimap_run_command ($imap_stream, "FETCH $id (FLAGS BODYSTRUCTURE)", true, $response, $message, TRUE); if ($read) { @@ -727,7 +728,7 @@ function sqimap_get_message ($imap_stream, $id, $mailbox) { $errmessage = _("The server couldn't find the message you requested.") . '

'._("Most probably your message list was out of date and the message has been moved away or deleted (perhaps by another program accessing the same mailbox)."); /* this will include a link back to the message list */ - error_message($errmessage, $mailbox, $sort, $startMessage, $color); + error_message($errmessage, $mailbox, $sort, (int) $startMessage, $color); exit; } $bodystructure = implode('',$read); -- 2.25.1