Skip to content

Commit

Permalink
Fix RSA key validation #186
Browse files Browse the repository at this point in the history
  • Loading branch information
massivemadness committed Apr 5, 2023
1 parent 8f1b693 commit 26c98f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion filesystems/filesystem-sftp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation files("libs/bcprov-jdk18on-172.jar")

// Network
implementation library.sftpclient
implementation library.jsch

// Coroutines
implementation library.coroutines_core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ class SFTPFilesystem(
return FileModel(SFTP_SCHEME + serverConfig.initialDir, serverConfig.uuid)
}

@Suppress("UNCHECKED_CAST")
override fun provideDirectory(parent: FileModel): FileTree {
try {
connect()
return FileTree(
parent = sftpMapper.parent(parent),
children = (channel?.ls(parent.path) as Vector<ChannelSftp.LsEntry>)
children = channel?.ls(parent.path).orEmpty()
.filter { it.filename.isValidFileName() }
.map(sftpMapper::toFileModel),
)
Expand Down
4 changes: 2 additions & 2 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ext {
// Network
gson_version = '2.10.1'
ftpclient_version = '3.9.0'
sftpclient_version = '0.1.55'
jsch_version = '0.2.8'

// Coroutines
coroutines_version = '1.6.4'
Expand Down Expand Up @@ -128,7 +128,7 @@ ext {
// Network
gson: "com.google.code.gson:gson:$gson_version",
ftpclient: "commons-net:commons-net:$ftpclient_version",
sftpclient: "com.jcraft:jsch:$sftpclient_version",
jsch: "com.github.mwiede:jsch:$jsch_version",

// Coroutines
coroutines_core: "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version",
Expand Down

0 comments on commit 26c98f4

Please sign in to comment.