aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Common/Validation/AbsolutePathAttribute.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-17 15:30:56 -0500
committerJP Dillingham <jp@dillingham.me>2026-05-17 15:30:56 -0500
commit4d37deb2cd7f46f1e3a0a683bf9f8507ef39ef54 (patch)
treec3e76eaf43a3c361710b3e821b251d0f1ca5f7b7 /src/slskd/Common/Validation/AbsolutePathAttribute.cs
parente3b6bd9954ea330402f1c44719a82fd56f173196 (diff)
downloadslskd-4d37deb2cd7f46f1e3a0a683bf9f8507ef39ef54.tar.gz
remove path traversal test from absolute/relative path validation
Diffstat (limited to 'src/slskd/Common/Validation/AbsolutePathAttribute.cs')
-rw-r--r--src/slskd/Common/Validation/AbsolutePathAttribute.cs6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/slskd/Common/Validation/AbsolutePathAttribute.cs b/src/slskd/Common/Validation/AbsolutePathAttribute.cs
index 4c9f5e53..1999220f 100644
--- a/src/slskd/Common/Validation/AbsolutePathAttribute.cs
+++ b/src/slskd/Common/Validation/AbsolutePathAttribute.cs
@@ -49,12 +49,6 @@ namespace slskd.Validation
{
return new ValidationResult($"The {validationContext.DisplayName} field must be an absolute file path.");
}
-
- // unrelated to absolute/relative check; we disallow traversal segments across the board so check while we're here
- if (FileSafety.ContainsTraversalSegments(path))
- {
- return new ValidationResult($"The {validationContext.DisplayName} field contains one or more unsafe path traversal segments ('.' or '..')");
- }
}
return ValidationResult.Success;