Emergency fix: prevent erase users pictures

This method has deleted several logo images when we use the rollback function. Added path checking to avoid deleting files elsewhere than in /tmp/
This commit is contained in:
Dominique FERET 2019-10-01 16:28:06 +02:00 committed by GitHub
parent ebc9ac2c81
commit 081369e428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7798,7 +7798,7 @@ class TCPDF {
}
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
if(is_file($file)) unlink($file);
if(substr($file, 0 , 5) === '/tmp/' && is_file($file)) unlink($file);
}
}
}