Use uniqid with more entropy to reduce probability of collisions

This commit is contained in:
Jan Böhmer 2024-09-08 23:42:36 +02:00
parent 015a72321d
commit cede73e767

View file

@ -1017,7 +1017,7 @@ class OEMSecretsProvider implements InfoProviderInterface
$sheetName = basename($urlComponents['path']);
if (strpos($sheetName, '.') === false || !preg_match('/\.(pdf|doc|docx|xls|xlsx|ppt|pptx)$/i', $sheetName)) {
// If the name does not have a valid extension, assign a default name
$sheetName = 'datasheet_' . uniqid() . '.pdf';
$sheetName = 'datasheet_' . uniqid('', true) . '.pdf';
}
}
}