From bd0551b22076b82a6d49e9f7a2b2e0c90a1b2326 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Fri, 05 Feb 2016 07:25:27 -0500 Subject: [PATCH] Secure also downloads of addressbook exports, managesieve script exports and Enigma keys exports --- program/lib/Roundcube/rcube_storage.php | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index e53e105..387b3d0 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -47,6 +47,7 @@ protected $search_set; protected $options = array('auth_type' => 'check'); protected $page_size = 10; + protected $list_page = 1; protected $threading = false; /** @@ -206,7 +207,9 @@ */ public function set_page($page) { - $this->list_page = (int) $page; + if ($page = intval($page)) { + $this->list_page = $page; + } } /** @@ -405,7 +408,7 @@ /** * Fetch message headers and body structure from the server and build - * an object structure similar to the one generated by PEAR::Mail_mimeDecode + * an object structure. * * @param int $uid Message UID to fetch * @param string $folder Folder to read from @@ -451,7 +454,7 @@ { $headers = $this->get_message_headers($uid); return rcube_charset::convert($this->get_message_part($uid, $part, null), - $headers->charset ? $headers->charset : $this->default_charset); + $headers->charset ?: $this->default_charset); } /** @@ -942,10 +945,11 @@ * @param string $folder Folder name (empty for server metadata) * @param array $entries Entries * @param array $options Command options (with MAXSIZE and DEPTH keys) + * @param bool $force Disables cache use * * @return array Metadata entry-value hash array on success, NULL on error */ - abstract function get_metadata($folder, $entries, $options = array()); + abstract function get_metadata($folder, $entries, $options = array(), $force = false); /* ----------------------------------------- * Cache related functions -- Gitblit v1.9.1