From 037af6890fe6fdb84a08d3c86083e847c90ec0ad Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Tue, 22 Oct 2013 08:17:26 -0400 Subject: [PATCH] Fix vulnerability in handling _session argument of utils/save-prefs (#1489382) --- program/steps/addressbook/list.inc | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/program/steps/addressbook/list.inc b/program/steps/addressbook/list.inc index 06a1e10..6f3a3e0 100644 --- a/program/steps/addressbook/list.inc +++ b/program/steps/addressbook/list.inc @@ -49,7 +49,7 @@ while ($row = $result->next()) { $row['sourceid'] = $s; - $key = rcmail_contact_key($row, $sort_col); + $key = rcube_addressbook::compose_contact_key($row, $sort_col); $records[$key] = $row; } unset($result); @@ -81,6 +81,11 @@ $OUTPUT->show_message('contactsearchonly', 'notice'); $OUTPUT->command('command', 'advanced-search'); } + + if ($CONTACTS->group_id) { + $OUTPUT->command('set_group_prop', array('ID' => $CONTACTS->group_id) + + array_intersect_key((array)$CONTACTS->get_group($CONTACTS->group_id), array('name'=>1,'email'=>1))); + } } // update message count display -- Gitblit v1.9.1