Skip to content
This repository was archived by the owner on Nov 10, 2019. It is now read-only.

Commit 30f0dba

Browse files
committed
fix check_request() bypass in places using get_uids() [CVE-2018-9846]
1 parent 31a703f commit 30f0dba

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Roundcube Webmail MarkAsJunk2
22
=============================
33

4+
Version 1.10.1 (2018-04-17, rc-1.1.11)
5+
=================================================
6+
* Fix check_request() bypass in places using get_uids() [CVE-2018-9846]
7+
48
Version 1.10 (2017-01-02, rc-1.1)
59
=================================================
610
* Add JS event markasjunk2-update to allow other plugins to influence the spam/ham options show

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "http://github.com/JohnDoh/Roundcube-Plugin-Mark-as-Junk-2/",
66
"license": "GPL-3.0",
77
"type": "roundcube-plugin",
8-
"version": "1.10",
8+
"version": "1.10.1",
99
"authors": [
1010
{
1111
"name": "Philip Weir",

markasjunk2.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ function mark_message()
8989

9090
$is_spam = rcube::get_instance()->action == 'plugin.markasjunk2.junk' ? true : false;
9191
$multi_folder = $_POST['_multifolder'] == 'true' ? true : false;
92-
$messageset = rcmail::get_uids();
92+
$uids = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
9393
$mbox_name = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
94+
$messageset = !empty($uids) ? rcmail::get_uids($uids, $mbox_name) : array();
9495
$dest_mbox = $is_spam ? $this->spam_mbox : $this->ham_mbox;
9596
$result = $is_spam ? $this->_spam($messageset, $dest_mbox) : $this->_ham($messageset, $dest_mbox);
9697

0 commit comments

Comments
 (0)