diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-05-16 14:54:14 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-05-16 14:54:14 -0500 |
| commit | 8dc86c07d7e3c0ad82ad8e1c1c64b26a460774ac (patch) | |
| tree | caffe6d7c01d8ad66728f47e9f905ded5d0d578a /src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs | |
| parent | 8265857697b6116f97fc435d7313f0a8161b9e13 (diff) | |
| download | slskd-8dc86c07d7e3c0ad82ad8e1c1c64b26a460774ac.tar.gz | |
tweak validation on batch request
Diffstat (limited to 'src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs')
| -rw-r--r-- | src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs | 7 |
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 |
