Commit b96fec7b by Mark

fixed path traversal

parent e406f03e
...@@ -95,7 +95,7 @@ class DefaultController extends Controller ...@@ -95,7 +95,7 @@ class DefaultController extends Controller
public function actionDownloadMail($file) public function actionDownloadMail($file)
{ {
$filePath = Yii::getAlias($this->module->panels['mail']->mailPath) . '/' . $file; $filePath = Yii::getAlias($this->module->panels['mail']->mailPath) . '/' . basename($file);
if (!is_file($filePath)) { if (!is_file($filePath)) {
throw new NotFoundHttpException('Mail file not found'); throw new NotFoundHttpException('Mail file not found');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment