Skip to content

Commit 24552ef

Browse files
author
Nitin Chaudhary
committed
Fix InputValidationTest.cpp - use ValidateFilePath instead of ValidateBundlePath
1 parent 0a4709c commit 24552ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vnext/Microsoft.ReactNative.Cxx.UnitTests/InputValidationTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ TEST(PathValidatorTest, BlobIDLengthLimit) {
135135

136136
TEST(PathValidatorTest, BundlePathTraversalBlocked) {
137137
// SDL: Block path traversal in bundle paths
138-
EXPECT_THROW(PathValidator::ValidateBundlePath("../../etc/passwd"), ValidationException);
139-
EXPECT_THROW(PathValidator::ValidateBundlePath("..\\..\\windows"), ValidationException);
140-
EXPECT_THROW(PathValidator::ValidateBundlePath("%2e%2e%2f"), ValidationException);
138+
EXPECT_THROW(PathValidator::ValidateFilePath("../../etc/passwd", "C:\\app"), ValidationException);
139+
EXPECT_THROW(PathValidator::ValidateFilePath("..\\..\\windows", "C:\\app"), ValidationException);
140+
EXPECT_THROW(PathValidator::ValidateFilePath("%2e%2e%2f", "C:\\app"), ValidationException);
141141
}
142142

143143
// ============================================================================

0 commit comments

Comments
 (0)