From 86a849634431d61e8531c7bc086c333a1b52da88 Mon Sep 17 00:00:00 2001 From: Uli Heller Date: Fri, 5 Oct 2018 13:44:56 +0200 Subject: [PATCH 1/4] Upgraded apache-sshd: 1.7.0 -> 2.1.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index ad28306bd..bbfca7dc7 100644 --- a/build.sbt +++ b/build.sbt @@ -43,7 +43,7 @@ libraryDependencies ++= Seq( "org.apache.commons" % "commons-compress" % "1.18", "org.apache.commons" % "commons-email" % "1.5", "org.apache.httpcomponents" % "httpclient" % "4.5.6", - "org.apache.sshd" % "apache-sshd" % "1.7.0" exclude ("org.slf4j", "slf4j-jdk14"), + "org.apache.sshd" % "apache-sshd" % "2.1.0" exclude ("org.slf4j", "slf4j-jdk14"), "org.apache.tika" % "tika-core" % "1.19.1", "com.github.takezoe" %% "blocking-slick-32" % "0.0.11", "com.novell.ldap" % "jldap" % "2009-10-07", From ebd2efcd6e6dc48e606bd23edd2b842bf9a1525f Mon Sep 17 00:00:00 2001 From: Uli Heller Date: Fri, 5 Oct 2018 13:45:40 +0200 Subject: [PATCH 2/4] Fixes for apache-sshd-2.1.0: Package name for Command and CommandFactory --- src/main/scala/gitbucket/core/plugin/Plugin.scala | 2 +- src/main/scala/gitbucket/core/plugin/PluginRegistry.scala | 2 +- src/main/scala/gitbucket/core/ssh/GitCommand.scala | 2 +- src/main/scala/gitbucket/core/ssh/NoShell.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/gitbucket/core/plugin/Plugin.scala b/src/main/scala/gitbucket/core/plugin/Plugin.scala index 92a51ea23..06355f299 100644 --- a/src/main/scala/gitbucket/core/plugin/Plugin.scala +++ b/src/main/scala/gitbucket/core/plugin/Plugin.scala @@ -8,7 +8,7 @@ import gitbucket.core.service.RepositoryService.RepositoryInfo import gitbucket.core.service.SystemSettingsService.SystemSettings import gitbucket.core.util.SyntaxSugars._ import io.github.gitbucket.solidbase.model.Version -import org.apache.sshd.server.Command +import org.apache.sshd.server.command.Command import play.twirl.api.Html /** diff --git a/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala b/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala index 6964732da..c37f1aede 100644 --- a/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala +++ b/src/main/scala/gitbucket/core/plugin/PluginRegistry.scala @@ -24,7 +24,7 @@ import io.github.gitbucket.solidbase.manager.JDBCVersionManager import io.github.gitbucket.solidbase.model.Module import org.apache.commons.io.FileUtils import org.apache.http.client.methods.HttpGet -import org.apache.sshd.server.Command +import org.apache.sshd.server.command.Command import org.slf4j.LoggerFactory import play.twirl.api.Html diff --git a/src/main/scala/gitbucket/core/ssh/GitCommand.scala b/src/main/scala/gitbucket/core/ssh/GitCommand.scala index 19dcdbf5c..b997f65c0 100644 --- a/src/main/scala/gitbucket/core/ssh/GitCommand.scala +++ b/src/main/scala/gitbucket/core/ssh/GitCommand.scala @@ -6,7 +6,7 @@ import gitbucket.core.service.{AccountService, DeployKeyService, RepositoryServi import gitbucket.core.servlet.{CommitLogHook, Database} import gitbucket.core.util.{SyntaxSugars, Directory} import org.apache.sshd.server.{Environment, ExitCallback, SessionAware} -import org.apache.sshd.server.{Command, CommandFactory} +import org.apache.sshd.server.command.{Command, CommandFactory} import org.apache.sshd.server.session.ServerSession import org.slf4j.LoggerFactory import java.io.{File, InputStream, OutputStream} diff --git a/src/main/scala/gitbucket/core/ssh/NoShell.scala b/src/main/scala/gitbucket/core/ssh/NoShell.scala index 35f276aff..b350e266d 100644 --- a/src/main/scala/gitbucket/core/ssh/NoShell.scala +++ b/src/main/scala/gitbucket/core/ssh/NoShell.scala @@ -3,7 +3,7 @@ package gitbucket.core.ssh import gitbucket.core.service.SystemSettingsService.SshAddress import org.apache.sshd.common.Factory import org.apache.sshd.server.{Environment, ExitCallback} -import org.apache.sshd.server.Command +import org.apache.sshd.server.command.Command import java.io.{OutputStream, InputStream} import org.eclipse.jgit.lib.Constants From e513a581e747393a4e8161aa18e7e793fe79ea61 Mon Sep 17 00:00:00 2001 From: Uli Heller Date: Fri, 5 Oct 2018 14:24:56 +0200 Subject: [PATCH 3/4] Fixes for apache-sshd-2.1.0: Fixed package for 'UnknownCommand' - closes #2161 --- src/main/scala/gitbucket/core/ssh/GitCommand.scala | 2 +- src/test/scala/gitbucket/core/ssh/GitCommandSpec.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/gitbucket/core/ssh/GitCommand.scala b/src/main/scala/gitbucket/core/ssh/GitCommand.scala index b997f65c0..8e8cfe568 100644 --- a/src/main/scala/gitbucket/core/ssh/GitCommand.scala +++ b/src/main/scala/gitbucket/core/ssh/GitCommand.scala @@ -16,7 +16,7 @@ import org.eclipse.jgit.api.Git import Directory._ import gitbucket.core.ssh.PublicKeyAuthenticator.AuthType import org.eclipse.jgit.transport.{ReceivePack, UploadPack} -import org.apache.sshd.server.scp.UnknownCommand +import org.apache.sshd.server.shell.UnknownCommand import org.eclipse.jgit.errors.RepositoryNotFoundException object GitCommand { diff --git a/src/test/scala/gitbucket/core/ssh/GitCommandSpec.scala b/src/test/scala/gitbucket/core/ssh/GitCommandSpec.scala index 9051c5770..93dd0d4b0 100644 --- a/src/test/scala/gitbucket/core/ssh/GitCommandSpec.scala +++ b/src/test/scala/gitbucket/core/ssh/GitCommandSpec.scala @@ -1,6 +1,6 @@ package gitbucket.core.ssh -import org.apache.sshd.server.scp.UnknownCommand +import org.apache.sshd.server.shell.UnknownCommand import org.scalatest.FunSpec class GitCommandFactorySpec extends FunSpec { From 03e32f970e1ea7aa599dddfbe718105bc9e54388 Mon Sep 17 00:00:00 2001 From: Uli Heller Date: Sun, 4 Nov 2018 09:56:29 +0100 Subject: [PATCH 4/4] Fixes for apache-sshd-2.1.0: exclude sshd-mina and sshd-netty - closes #2168 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index bbfca7dc7..1452d3235 100644 --- a/build.sbt +++ b/build.sbt @@ -43,7 +43,7 @@ libraryDependencies ++= Seq( "org.apache.commons" % "commons-compress" % "1.18", "org.apache.commons" % "commons-email" % "1.5", "org.apache.httpcomponents" % "httpclient" % "4.5.6", - "org.apache.sshd" % "apache-sshd" % "2.1.0" exclude ("org.slf4j", "slf4j-jdk14"), + "org.apache.sshd" % "apache-sshd" % "2.1.0" exclude ("org.slf4j", "slf4j-jdk14") exclude ("org.apache.sshd", "sshd-mina") exclude ("org.apache.sshd", "sshd-netty"), "org.apache.tika" % "tika-core" % "1.19.1", "com.github.takezoe" %% "blocking-slick-32" % "0.0.11", "com.novell.ldap" % "jldap" % "2009-10-07",