mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Uses platform path separator in artwork sanitization security test
This commit is contained in:
1 parent
deada87e56
commit
8144cb2986
1 file changed
+4
-3
+4
-3
@@ -124,12 +124,13 @@ public class BookArtworkServiceSecurityTests
|
||||
.Returns(Result.From(_fileSystemPathIdFixture.Create(Path.Combine(AppContext.BaseDirectory, "media", "books", "cover.jpeg"))));
|
||||
|
||||
// Act
|
||||
char separator = Path.DirectorySeparatorChar;
|
||||
Result<string> result = await _sut.SaveBookArtworkAsync(
|
||||
Guid.NewGuid(),
|
||||
Guid.NewGuid(),
|
||||
libraryName: "..\\..\\Library",
|
||||
authorName: "..\\evil",
|
||||
bookTitle: "..\\..\\cover",
|
||||
libraryName: $"..{separator}..{separator}Library",
|
||||
authorName: $"..{separator}evil",
|
||||
bookTitle: $"..{separator}..{separator}cover",
|
||||
_artworkDtoFixture.Create(localPath: sourcePath),
|
||||
CancellationToken.None);
|
||||
|
||||
|
||||
Reference in new issue
Block a user