aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Common/Middleware/UrlEncodingModelBinder.cs
AgeCommit message (Collapse)AuthorLines
2026-03-29add FORKING.mdJP Dillingham-2/+1
2026-03-28remove non breaking spacesJP Dillingham-6/+5
2026-03-24fix remaining headersJP Dillingham-15/+32
2026-01-14rearrange model binderJP Dillingham-12/+11
2026-01-14Fix UrlEncodingModelBinder to account for PathBaseAndy Kelk-1/+11
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.
2026-01-12docsJP Dillingham-2/+2
2026-01-11use raw url, before any decodingJP Dillingham-12/+37
2026-01-10rename and tweakJP Dillingham-0/+119