From 7fa2971c836fc194f00f90f6003166f585d0dd87 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Sat, 7 Jul 2012 06:04:04 +0000 Subject: [PATCH] Fixed an access issue with the media-manager dialog window. --- e107_admin/image.php | 11 ++++++++--- e107_admin/newspost.php | 10 ++++++++-- e107_files/jslib/core/admin.jquery.js | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index e872be907..680238bd9 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -18,7 +18,7 @@ if (!defined('e107_INIT')) require_once("../class2.php"); } -if (!getperms("A")) +if (!getperms("A") && ($_GET['action'] != 'dialog')) { header("location:".e_HTTP."index.php"); exit; @@ -458,8 +458,10 @@ class media_admin_ui extends e_admin_ui $this->updateSettings(); } - if($this->getQuery('mode') == 'dialog') + if($this->getQuery('mode') == 'dialog')//TODO Check this actually does something, as it was changed to 'action'. { + if(!ADMIN){ exit; } + $cat = $_GET['for']; if(!isset($this->cats[$cat])) { @@ -574,6 +576,9 @@ class media_admin_ui extends e_admin_ui function uploadPage() { + if(!ADMIN){ exit; } //TODO check for upload-access in perms. + + $text = '

No HTML5 support.

'; @@ -702,7 +707,7 @@ class media_admin_ui extends e_admin_ui $text .= "