aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs')
-rw-r--r--src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
index fe539ce7..05a913bd 100644
--- a/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
+++ b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
@@ -58,7 +58,8 @@ public record QueueDownloadBatchRequest
/// The username of the user from which to download.
/// </summary>
[Required]
- [StringLength(500, MinimumLength = 1)]
+ [NotNullOrWhiteSpace]
+ [StringLength(maximumLength: 500)]
public string Username { get; init; }
/// <summary>
@@ -80,7 +81,8 @@ public record EnqueueDownloadBatchItem
/// The name of the file.
/// </summary>
[Required]
- [StringLength(int.MaxValue, MinimumLength = 1)]
+ [NotNullOrWhiteSpace]
+ [NonTraversingPath]
public string Filename { get; init; }
/// <summary>
@@ -96,5 +98,6 @@ public record EnqueueDownloadBatchOptions
/// The destination directory for the files, relative to the configured download directory.
/// </summary>
[RelativePath]
+ [NonTraversingPath]
public string Destination { get; init; }
} \ No newline at end of file