Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public void testInvalidParameter() throws Exception {
public void testDirectoryErrors() throws SQLException {
try (final Connection connection = senderEnv.getConnection();
final Statement statement = connection.createStatement()) {
List<String> wrongDirs = Arrays.asList(".", "..", "./hackYou", ".\\hackYouTwice");
List<String> wrongDirs = Arrays.asList(".", "..", "/hackYou", "..\\hackYouTwice");
if (SystemUtils.IS_OS_WINDOWS) {
wrongDirs = new ArrayList<>(wrongDirs);
wrongDirs.add("BombWindows/:*?");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ private static void copyFileRename(final File sourceFile, final File targetFile)
}

public static String getIllegalError4Directory(final String path) {
if (path.equals(".") || path.equals("..") || path.contains("./") || path.contains(".\\")) {
if (path.equals(".") || path.equals("..") || path.contains("/") || path.contains("\\")) {
return ILLEGAL_PATH_MESSAGE;
}
if (!WindowsOSUtils.isLegalPathSegment4Windows(path)) {
Expand Down