Skip to content

Commit

Permalink
avoid collision of generated filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Jun 21, 2024
1 parent 8d8d50b commit 149af17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SparkPostApiTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ protected function logMessageContent(Email $message, $results = [])
// Generate filename
$filter = new FileNameFilter();
$title = substr($filter->filter($subject), 0, 35);
$logName = date('Ymd_His') . '_' . $title;
$logName = date('Ymd_His') . '_' . bin2hex(random_bytes(2)) . '_' . $title;

// Store attachments if any
$attachments = $message->getAttachments();
Expand Down

0 comments on commit 149af17

Please sign in to comment.