From c8a22d9537b02c5458ef53966778cf273ebe86ae Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 4 Nov 2024 15:28:59 -0500 Subject: [PATCH] fix #4795 - ensure deterministic ordering of file parts when merging files after upload (credit @HQuast) --- Oqtane.Server/Controllers/FileController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/Controllers/FileController.cs b/Oqtane.Server/Controllers/FileController.cs index 1e8a1740f..70d17d1d2 100644 --- a/Oqtane.Server/Controllers/FileController.cs +++ b/Oqtane.Server/Controllers/FileController.cs @@ -517,7 +517,7 @@ private async Task MergeFile(string folder, string filename) bool success = true; using (var stream = new FileStream(Path.Combine(folder, filename + ".tmp"), FileMode.Create)) { - foreach (string filepart in fileparts) + foreach (string filepart in fileparts.Order()) { try {