kartik-v / mpdf

Fork of the mPDF latest DEV library (unofficial) with composer and packagist support.
GNU General Public License v2.0
40 stars 55 forks source link

Invalid path check is_dir tmp file delete #17

Open kamilzamerski opened 7 years ago

kamilzamerski commented 7 years ago

Line 8354 mpdf.php

if (($file != "..") && ($file != ".") && !is_dir($file) && ((filemtime(_MPDF_TEMP_PATH.$file)+$interval) < time()) && (substr($file, 0, 1) !== '.') && ($file !='dummy.txt')) { // mPDF 5.7.3

Invalid is_dir check file, there is no have path of this file/dir so it always return false, it must by like this:

if (($file != "..") && ($file != ".") && !is_dir(_MPDF_TEMP_PATH.$file) && ((filemtime(_MPDF_TEMP_PATH.$file)+$interval) < time()) && (substr($file, 0, 1) !== '.') && ($file !='dummy.txt')) { // mPDF 5.7.3

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39354689-invalid-path-check-is_dir-tmp-file-delete?utm_campaign=plugin&utm_content=tracker%2F7827090&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F7827090&utm_medium=issues&utm_source=github).