From 84c4a7dcd5bdb974533958df870628d84f6fd1a4 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 28 Jan 2019 12:17:28 +0100 Subject: [PATCH] Dev Some translations fixes --- application/controllers/admin/themes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/admin/themes.php b/application/controllers/admin/themes.php index e93f20d0c52..85611f40d87 100755 --- a/application/controllers/admin/themes.php +++ b/application/controllers/admin/themes.php @@ -465,9 +465,9 @@ public function templatefiledelete() $sPostedFile = CHtml::decode(App()->request->getPost('otherfile')); // Filename is encode, need to decode. $sFileToDelete = str_replace($oEditedTemplate->filesPath, '', $sPostedFile); $the_full_file_path = realpath($filesdir.$sFileToDelete); - /* Try to delete a file out of files dir */ if(substr($the_full_file_path, 0, strlen(realpath($filesdir))) != realpath($filesdir)) { - Yii::app()->user->setFlash('error', sprintf(gT("File %s couldn't be deleted, out of template files directory."), CHtml::encode($sPostedFile))); + /* User tries to delete a file outside of files dir */ + Yii::app()->user->setFlash('error', sprintf(gT("File %s cannot be deleted for security reasons."), CHtml::encode($sPostedFile))); $this->getController()->redirect(array('admin/themes', 'sa'=>'view', 'editfile'=> App()->request->getPost('editfile'), 'screenname'=>App()->request->getPost('screenname'), 'templatename'=>$sTemplateName)); } /* No try to hack, go to delete */