From b175607c416d99951c16eda16e5c3053199fe7c0 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 18 Aug 2022 08:25:37 +0800 Subject: [PATCH 1/2] * Code for file checkpriv bug. --- module/file/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/file/model.php b/module/file/model.php index b4d6fa25a6..aaf8813c45 100755 --- a/module/file/model.php +++ b/module/file/model.php @@ -565,7 +565,7 @@ class fileModel extends model } elseif($objectType == 'feedback') { - $productID = $this->dao->findById($objectID)->from(TABLE_FEEDBACK)->fetch(); + $productID = $this->dao->findById($objectID)->from(TABLE_FEEDBACK)->fetch('product'); $grantProducts = $this->loadModel('feedback')->getGrantProducts(); return in_array($productID, array_keys($grantProducts)); } From ef679444bd06463e9b72733e8ad32bc04768744d Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 18 Aug 2022 08:47:49 +0800 Subject: [PATCH 2/2] * Code for file checkpriv bug. --- module/file/control.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/file/control.php b/module/file/control.php index 6ce27a6fc5..36e29ae62e 100755 --- a/module/file/control.php +++ b/module/file/control.php @@ -130,6 +130,7 @@ class file extends control if(!$this->file->checkPriv($file)) { echo(js::alert($this->lang->file->accessDenied)); + if(isonlybody()) return print(js::reload('parent.parent')); return print(js::locate(helper::createLink('my', 'index'))); }