Skip to content

Commit

Permalink
Security fix n°2 - make chunk names safe too
Browse files Browse the repository at this point in the history
See: b61c252
  • Loading branch information
williamdes committed Dec 16, 2023
1 parent 4f1078b commit 7e7697f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resumable.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function tmpChunkDir(string $identifier): string
*/
public function tmpChunkFilename(string $filename, int $chunkNumber): string
{
return $filename . '.' . str_pad((string) $chunkNumber, 4, '0', STR_PAD_LEFT);
return $this->createSafeName($filename) . '.' . str_pad((string) $chunkNumber, 4, '0', STR_PAD_LEFT);
}

public function createFileFromChunks(array $chunkFiles, string $destFile): bool
Expand Down

0 comments on commit 7e7697f

Please sign in to comment.