mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +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"))));
|
.Returns(Result.From(_fileSystemPathIdFixture.Create(Path.Combine(AppContext.BaseDirectory, "media", "books", "cover.jpeg"))));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
char separator = Path.DirectorySeparatorChar;
|
||||||
Result<string> result = await _sut.SaveBookArtworkAsync(
|
Result<string> result = await _sut.SaveBookArtworkAsync(
|
||||||
Guid.NewGuid(),
|
Guid.NewGuid(),
|
||||||
Guid.NewGuid(),
|
Guid.NewGuid(),
|
||||||
libraryName: "..\\..\\Library",
|
libraryName: $"..{separator}..{separator}Library",
|
||||||
authorName: "..\\evil",
|
authorName: $"..{separator}evil",
|
||||||
bookTitle: "..\\..\\cover",
|
bookTitle: $"..{separator}..{separator}cover",
|
||||||
_artworkDtoFixture.Create(localPath: sourcePath),
|
_artworkDtoFixture.Create(localPath: sourcePath),
|
||||||
CancellationToken.None);
|
CancellationToken.None);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user