aboutsummaryrefslogtreecommitdiffstats
path: root/tests/slskd.Tests.Unit/Common
AgeCommit message (Collapse)AuthorLines
2026-11-01add unit tests for middlewareJP Dillingham-0/+394
2026-09-07add IsRootDirectoryOf and IsSubDirectoryOf to FileSafetyJP Dillingham-0/+460
2026-06-06wipJP Dillingham-2/+2
2026-06-06small tweaksJP Dillingham-29/+5
2026-06-06small tweaksJP Dillingham-29/+5
2026-06-04wipJP Dillingham-0/+230
2026-06-04remove tests related to stripping of rootsJP Dillingham-123/+14
2026-06-04testsJP Dillingham-292/+754
2026-06-03fix all the testsJP Dillingham-106/+105
2026-06-03remove deprecated extension methodsJP Dillingham-160/+0
2026-06-02Merge remote-tracking branch 'origin/master' into destinationJP Dillingham-9/+9
2026-06-02add comprehensive cross-platform path and filename handling functionsJP Dillingham-0/+1153
2026-06-01add leading slashes back when SanitizePath and retainRoot = trueJP Dillingham-0/+93
2026-06-01gracefully handle nullsJP Dillingham-1/+42
2026-05-31more testsJP Dillingham-7/+90
2026-05-31i want to be done with thisJP Dillingham-27/+129
2026-05-31tweaksJP Dillingham-18/+36
2026-05-30more tests, make root stripping optionalJP Dillingham-15/+201
2026-05-30add SanitizePathSegmentJP Dillingham-0/+99
2026-05-30extract StripPathRootJP Dillingham-0/+150
2026-05-30remove deprecated common extensionsJP Dillingham-3/+3
2026-05-28testsJP Dillingham-1/+39
2026-05-27remove deprecated extension methodJP Dillingham-144/+0
2026-05-27add tests for FileSafety methodsJP Dillingham-0/+343
2026-05-23make CombineSafely() even saferJP Dillingham-0/+95
2026-05-22adjust abs/rel tests for attributesJP Dillingham-50/+95
2026-05-22fix copypastaJP Dillingham-3/+3
2026-05-22adjust FileSafety testsJP Dillingham-697/+416
2026-05-18fix path detection (again)JP Dillingham-545/+612
2026-05-17mess with tests and validationJP Dillingham-308/+179
2026-05-16fix testJP Dillingham-0/+7
2026-05-16add StringAttribute to cover all string related validationJP Dillingham-254/+517
2026-05-16add NonTraversingPathAttributeJP Dillingham-0/+94
2026-05-15fix testsJP Dillingham-3/+3
2026-05-15add tests for GuidAttributeJP Dillingham-0/+74
2026-05-14Merge remote-tracking branch 'origin/master' into batchesJP Dillingham-1/+1
2026-05-13add validator for disallowed charactersJP Dillingham-0/+254
2026-05-13add tests for extensionsJP Dillingham-18/+269
2026-05-13add validators for absolute and relative pathsJP Dillingham-0/+360
2026-05-13add FileSafetyJP Dillingham-0/+545
2026-05-13write our own logic for path relative/absoluteJP Dillingham-29/+155
2026-05-12add DisallowedCharacters attribute, ensure no slashes in instance/agent nameJP Dillingham-0/+254
2026-05-10more tests for ToLocalRelativeFilenameJP Dillingham-17/+124
2026-05-10GetInvalidPathChars() is invalid garbageJP Dillingham-0/+144
2026-05-10add file safety functionsJP Dillingham-0/+417
2026-05-09strip path traversal segments from configured pathsJP Dillingham-0/+362
2026-04-19add tests for DiffWithJP Dillingham-0/+523
2026-03-29add FORKING.mdJP Dillingham-3/+3
2026-03-15add additional tests for exponential compJP Dillingham-9/+46
2026-01-14Fix UrlEncodingModelBinder to account for PathBaseAndy Kelk-0/+173
When the application runs with a base path (e.g., /slskd via UsePathBase), the UrlEncodingModelBinder was incorrectly calculating the URL segment index. It was using the route template (which doesn't include the base path) to determine the index, but applying it to the raw URL (which does include the base path), causing it to extract the wrong segment. This fix strips the PathBase from the absolute path before splitting it into segments, ensuring the correct parameter value is extracted regardless of whether a base path is configured. Fixes regression introduced in PR #1596 (commits 8849d78c and e7e0cdaf) where [UrlEncoded] attribute was added to username parameters in v0.24.2. Also adds comprehensive unit tests to verify the fix works correctly with and without a base path, including edge cases like query strings and special characters in usernames.