From b447ff5197ed88859ddba0cc6ccaa21517d55444 Mon Sep 17 00:00:00 2001 From: ggrandes Date: Wed, 9 Mar 2022 23:17:09 +0100 Subject: [PATCH] updated versions of dependencies --- README.md | 9 +-- pom.xml | 63 ++++++++++++------- .../java/org/javastack/sftpserver/Server.java | 28 ++++----- .../javastack/sftpserver/ServiceLogger.java | 4 +- 4 files changed, 59 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index e34754d..885db63 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ SFTP Server (SSH File Transfer Protocol) based on `Apache MINA SSHD`. Open Source Java project under Apache License v2.0 -### Current Stable Version is [1.3.5](https://maven-release.s3.amazonaws.com/release/org/javastack/sftpserver/1.3.5/sftpserver-1.3.5-bin.zip) +### Current Stable Version is [1.4.0](https://maven-release.s3.amazonaws.com/release/org/javastack/sftpserver/1.4.0/sftpserver-1.4.0-bin.zip) --- @@ -14,6 +14,7 @@ SFTP Server (SSH File Transfer Protocol) based on `Apache MINA SSHD`. Open Sourc | 1.1.x | 1.6+ | | 1.2.x | 1.7+ | | 1.3.x | 1.8+ | +| 1.4.x | 1.8+ | ## Config: @@ -128,14 +129,14 @@ Maven Dependencies: * commons-codec-`XXX`.jar -[Log4J (logging)](http://logging.apache.org/log4j/1.2/) +[Log4J/Reload4J (logging)](https://reload4j.qos.ch/manual.html) -* log4j-`XXX`.jar +* reload4j-`XXX`.jar [SLF4J (logging)](http://www.slf4j.org/) * slf4j-api-`XXX`.jar -* slf4j-log4j12-`XXX`.jar +* slf4j-reload4j-`XXX`.jar [Bouncy Castle (encryption)](http://www.bouncycastle.org/java.html) diff --git a/pom.xml b/pom.xml index 5870388..3d3c6d0 100644 --- a/pom.xml +++ b/pom.xml @@ -5,11 +5,11 @@ org.javastack sftpserver - 1.3.5 + 1.4.0 SFTP Server (SSH File Transfer Protocol) ${project.groupId}:${project.artifactId} - https://github.com/ggrandes/${project.artifactId} + https://github.com/ggrandes/sftpserver The Apache License, Version 2.0 @@ -32,69 +32,78 @@ UTF-8 UTF-8 + 1.8 + 1.7.36 + 2.1.6 + 2.8.0 + 1.15 + 1.70 + 0.3.0 + 1.1.3 org.apache.mina mina-core - 2.1.3 + ${mina.version} org.apache.sshd sshd-core - 2.5.0 + ${sshd.version} org.apache.sshd sshd-sftp - 2.5.0 + ${sshd.version} org.apache.sshd sshd-scp - 2.5.0 + ${sshd.version} commons-codec commons-codec - 1.14 + ${commons-codec.version} org.bouncycastle bcprov-jdk15on - 1.65.01 + ${bc.version} org.bouncycastle bcpkix-jdk15on - 1.65 + ${bc.version} net.i2p.crypto eddsa - 0.3.0 + ${eddsa.version} org.slf4j slf4j-api - 1.7.30 + ${slf4j.version} + org.slf4j - slf4j-log4j12 - 1.7.30 + slf4j-reload4j + ${slf4j.version} - log4j - log4j - 1.2.17 + org.slf4j + jcl-over-slf4j + ${slf4j.version} com.jcraft jzlib - 1.1.3 + ${jzlib.version} @@ -103,22 +112,28 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.8.1 - 1.8 - 1.8 + ${java.version} + ${java.version} maven-jar-plugin - 2.3.1 + 3.2.2 ${project.artifactId}-${project.version} true + + true + maven + ${project.groupId} + ${project.groupId}:${project.artifactId} + ${project.version} @@ -133,7 +148,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.2.1 @@ -157,9 +172,9 @@ org.apache.maven.plugins maven-assembly-plugin - 2.5.3 + 3.3.0 - assembly/package.xml + assembly/package.xml ${project.artifactId}-${project.version} diff --git a/src/main/java/org/javastack/sftpserver/Server.java b/src/main/java/org/javastack/sftpserver/Server.java index 037b229..02b50a7 100644 --- a/src/main/java/org/javastack/sftpserver/Server.java +++ b/src/main/java/org/javastack/sftpserver/Server.java @@ -40,7 +40,6 @@ import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.NamedResource; import org.apache.sshd.common.PropertyResolver; -import org.apache.sshd.common.PropertyResolverUtils; import org.apache.sshd.common.cipher.BuiltinCiphers; import org.apache.sshd.common.compression.BuiltinCompressions; import org.apache.sshd.common.compression.Compression; @@ -54,10 +53,11 @@ import org.apache.sshd.common.session.SessionContext; import org.apache.sshd.common.session.SessionHeartbeatController.HeartbeatType; import org.apache.sshd.common.util.security.SecurityUtils; +import org.apache.sshd.core.CoreModuleProperties; +import org.apache.sshd.scp.server.ScpCommandFactory; import org.apache.sshd.server.Environment; import org.apache.sshd.server.ExitCallback; import org.apache.sshd.server.ServerBuilder; -import org.apache.sshd.server.ServerFactoryManager; import org.apache.sshd.server.SshServer; import org.apache.sshd.server.auth.password.PasswordAuthenticator; import org.apache.sshd.server.auth.pubkey.CachingPublicKeyAuthenticator; @@ -68,12 +68,11 @@ import org.apache.sshd.server.kex.Moduli; import org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; -import org.apache.sshd.server.scp.ScpCommandFactory; import org.apache.sshd.server.session.ServerSession; import org.apache.sshd.server.shell.ShellFactory; -import org.apache.sshd.server.subsystem.sftp.SftpFileSystemAccessor; -import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory; -import org.apache.sshd.server.subsystem.sftp.SftpSubsystemProxy; +import org.apache.sshd.sftp.server.SftpFileSystemAccessor; +import org.apache.sshd.sftp.server.SftpSubsystemFactory; +import org.apache.sshd.sftp.server.SftpSubsystemProxy; import org.javastack.sftpserver.readonly.ReadOnlyRootedFileSystemProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -243,7 +242,7 @@ private void closeQuietly(final Closeable c) { } private void hackVersion() { - PropertyResolverUtils.updateProperty(sshd, ServerFactoryManager.SERVER_IDENTIFICATION, "SSHD"); + CoreModuleProperties.SERVER_IDENTIFICATION.set(sshd, "SSHD"); } /** @@ -290,8 +289,7 @@ private void hackModuliDHGEX() { } if ((newModuli != null) && newModuli.canRead() && (newModuli.length() > 0)) { LOG.warn("Using moduli file: " + newModuli); - PropertyResolverUtils.updateProperty(sshd, ServerFactoryManager.MODULI_URL, - newModuli.toURI().toString()); + CoreModuleProperties.MODULI_URL.set(sshd, newModuli.toURI().toString()); } } } @@ -706,38 +704,38 @@ public void destroy(final ChannelSession channel) { static class CustomSftpFileSystemAccessor implements SftpFileSystemAccessor { @Override - public void setFileAttribute(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file, + public void setFileAttribute(final SftpSubsystemProxy subsystem, final Path file, final String view, final String attribute, final Object value, final LinkOption... options) throws IOException { throw new UnsupportedOperationException("Attribute set not supported for " + file); } @Override - public void setFileOwner(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file, + public void setFileOwner(final SftpSubsystemProxy subsystem, final Path file, final Principal value, final LinkOption... options) throws IOException { throw new UnsupportedOperationException("Owner set not supported for " + file); } @Override - public void setGroupOwner(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file, + public void setGroupOwner(final SftpSubsystemProxy subsystem, final Path file, final Principal value, final LinkOption... options) throws IOException { throw new UnsupportedOperationException("Group set not supported"); } @Override - public void setFilePermissions(final ServerSession session, final SftpSubsystemProxy subsystem, final Path file, + public void setFilePermissions(final SftpSubsystemProxy subsystem, final Path file, final Set perms, final LinkOption... options) throws IOException { throw new UnsupportedOperationException("Permissions set not supported"); } @Override - public void setFileAccessControl(final ServerSession session, final SftpSubsystemProxy subsystem, + public void setFileAccessControl(final SftpSubsystemProxy subsystem, final Path file, final List acl, final LinkOption... options) throws IOException { throw new UnsupportedOperationException("ACL set not supported"); } @Override - public void createLink(final ServerSession session, final SftpSubsystemProxy subsystem, final Path link, + public void createLink(final SftpSubsystemProxy subsystem, final Path link, final Path existing, final boolean symLink) throws IOException { throw new UnsupportedOperationException("Link not supported"); } diff --git a/src/main/java/org/javastack/sftpserver/ServiceLogger.java b/src/main/java/org/javastack/sftpserver/ServiceLogger.java index 054f991..7dbe09b 100644 --- a/src/main/java/org/javastack/sftpserver/ServiceLogger.java +++ b/src/main/java/org/javastack/sftpserver/ServiceLogger.java @@ -15,8 +15,8 @@ import org.apache.sshd.common.session.SessionListener; import org.apache.sshd.common.util.logging.AbstractLoggingBean; import org.apache.sshd.server.session.ServerSession; -import org.apache.sshd.server.subsystem.sftp.Handle; -import org.apache.sshd.server.subsystem.sftp.SftpEventListener; +import org.apache.sshd.sftp.server.Handle; +import org.apache.sshd.sftp.server.SftpEventListener; import org.slf4j.event.Level; public class ServiceLogger extends AbstractLoggingBean implements SftpEventListener, SessionListener {