mode 0640 for PDFs and certificates in tmp folder
This commit is contained in:
parent
5c5a2c4588
commit
4e8fe408b7
|
@ -1875,7 +1875,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$filename = 'userCertificate' . getRandomNumber() . '.der';
|
$filename = 'userCertificate' . getRandomNumber() . '.der';
|
||||||
$pathOut = dirname(__FILE__) . '/../../tmp/' . $filename;
|
$pathOut = dirname(__FILE__) . '/../../tmp/' . $filename;
|
||||||
$out = @fopen($pathOut, "wb");
|
$out = @fopen($pathOut, "wb");
|
||||||
@chmod($pathOut, 0600);
|
@chmod($pathOut, 0640);
|
||||||
fwrite($out, $this->attributes['userCertificate;binary'][$i]);
|
fwrite($out, $this->attributes['userCertificate;binary'][$i]);
|
||||||
fclose ($out);
|
fclose ($out);
|
||||||
$path = '../../tmp/' . $filename;
|
$path = '../../tmp/' . $filename;
|
||||||
|
|
|
@ -165,7 +165,7 @@ function createModulePDF($accounts, $pdf_structure="default", $returnAsString =
|
||||||
$filename = '../../tmp/' . getRandomNumber() . time() .'.pdf';
|
$filename = '../../tmp/' . getRandomNumber() . time() .'.pdf';
|
||||||
// Save PDF
|
// Save PDF
|
||||||
$pdf->Output($filename);
|
$pdf->Output($filename);
|
||||||
chmod($filename, 0600);
|
chmod($filename, 0640);
|
||||||
// return PDF file name
|
// return PDF file name
|
||||||
return $filename;
|
return $filename;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue