Skip to content

Commit

Permalink
Merge pull request #16636 from iterate-ch/bugfix/GH-16135
Browse files Browse the repository at this point in the history
Update dependency
  • Loading branch information
dkocher authored Dec 13, 2024
2 parents 4285fdc + 1f1231c commit 987426e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions defaults/src/main/resources/default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,13 @@ nextcloud.root.webdav.user=remote.php/dav/{0}/{1}
nextcloud.root.ocs=ocs/v1.php

smb.domain.default=WORKGROUP
smb.ntlm.workstation=
# Enable distributed filesystem path resolver
smb.dfs.enable=true
# Requires that messages from the server are signed
smb.signing.required=false
# Sign messages to the server
smb.signing.enable=true
smb.encrypt.enable=false
smb.socket.timeout=0
smb.protocol.negotiate.enable=true
Expand Down
2 changes: 1 addition & 1 deletion smb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<artifactId>smb</artifactId>
<packaging>jar</packaging>
<properties>
<smbj.version>0.13.0</smbj.version>
<smbj.version>0.14.0</smbj.version>
<testcontainers.version>1.20.4</testcontainers.version>
</properties>
<dependencies>
Expand Down
3 changes: 2 additions & 1 deletion smb/src/main/java/ch/cyberduck/core/smb/SMBSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import ch.cyberduck.core.Host;
import ch.cyberduck.core.HostKeyCallback;
import ch.cyberduck.core.ListService;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.LoginCallback;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathContainerService;
Expand Down Expand Up @@ -228,12 +227,14 @@ public SMBSession(final Host h) {
protected Connection connect(final ProxyFinder proxy, final HostKeyCallback key, final LoginCallback prompt, final CancelCallback cancel) throws BackgroundException {
try {
final SMBClient client = new SMBClient(SmbConfig.builder()
.withWorkStationName(new HostPreferences(host).getProperty("smb.ntlm.workstation"))
.withSocketFactory(new ProxySocketFactory(host))
.withTimeout(ConnectionTimeoutFactory.get(new HostPreferences(host)).getTimeout(), TimeUnit.SECONDS)
.withSoTimeout(new HostPreferences(host).getLong("smb.socket.timeout"), TimeUnit.SECONDS)
.withAuthenticators(new NtlmAuthenticator.Factory())
.withDfsEnabled(new HostPreferences(host).getBoolean("smb.dfs.enable"))
.withEncryptData(new HostPreferences(host).getBoolean("smb.encrypt.enable"))
.withSigningEnabled(new HostPreferences(host).getBoolean("smb.signing.enable"))
.withSigningRequired(new HostPreferences(host).getBoolean("smb.signing.required"))
.withRandomProvider(SecureRandomProviderFactory.get().provide())
.withMultiProtocolNegotiate(new HostPreferences(host).getBoolean("smb.protocol.negotiate.enable"))
Expand Down

0 comments on commit 987426e

Please sign in to comment.