Skip to content

Commit

Permalink
[jan] SECURITY: Fix permission check when downloading reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jun 13, 2017
1 parent fe483e5 commit 3e08a72
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/CHANGES
Expand Up @@ -2,6 +2,7 @@
v3.0.10-git
-----------

[jan] SECURITY: Fix permission check when downloading reports.


------
Expand Down
8 changes: 6 additions & 2 deletions lib/Application.php
Expand Up @@ -206,8 +206,12 @@ public function download(Horde_Variables $vars)

// Fetch all unresolved tickets assigned to the current user.
$info = array('id' => explode(',', $vars->ids));
$tickets = $whups_driver->getTicketsByProperties($info);
foreach ($tickets as $id => $info) {
$tickets = array();
foreach ($whups_driver->getTicketsByProperties($info) as $id => $info) {
if (!Whups::hasPermission($info['queue'], 'queue', Horde_Perms::READ)) {
continue;
}
$tickets[$id] = $info;
$tickets[$id]['#'] = $id + 1;
$tickets[$id]['link'] = Whups::urlFor('ticket', $info['id'], true, -1);
$tickets[$id]['date_created'] = strftime('%x', $info['timestamp']);
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Expand Up @@ -27,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/bsdl.php">BSD-2-Clause</license>
<notes>
*
* [jan] SECURITY: Fix permission check when downloading reports.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1246,7 +1246,7 @@
<date>2016-12-16</date>
<license uri="http://www.horde.org/licenses/bsdl.php">BSD-2-Clause</license>
<notes>
*
* [jan] SECURITY: Fix permission check when downloading reports.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 3e08a72

Please sign in to comment.