mirror of
https://github.com/iterate-ch/cyberduck.git
synced 2026-05-26 19:10:49 +00:00
Clear cached properties on disconnect.
This commit is contained in:
@@ -37,7 +37,6 @@ import ch.cyberduck.core.features.Read;
|
||||
import ch.cyberduck.core.features.Timestamp;
|
||||
import ch.cyberduck.core.features.Touch;
|
||||
import ch.cyberduck.core.features.Write;
|
||||
import ch.cyberduck.core.preferences.HostPreferencesFactory;
|
||||
import ch.cyberduck.core.proxy.ProxyFinder;
|
||||
import ch.cyberduck.core.proxy.ProxySocketFactory;
|
||||
import ch.cyberduck.core.random.SecureRandomProviderFactory;
|
||||
@@ -230,17 +229,17 @@ public class SMBSession extends ch.cyberduck.core.Session<Connection> {
|
||||
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(HostPreferencesFactory.get(host).getProperty("smb.ntlm.workstation"))
|
||||
.withWorkStationName(preferences.getProperty("smb.ntlm.workstation"))
|
||||
.withSocketFactory(new ProxySocketFactory(host))
|
||||
.withTimeout(ConnectionTimeoutFactory.get(HostPreferencesFactory.get(host)).getTimeout(), TimeUnit.SECONDS)
|
||||
.withSoTimeout(HostPreferencesFactory.get(host).getLong("smb.socket.timeout"), TimeUnit.SECONDS)
|
||||
.withTimeout(ConnectionTimeoutFactory.get(preferences).getTimeout(), TimeUnit.SECONDS)
|
||||
.withSoTimeout(preferences.getLong("smb.socket.timeout"), TimeUnit.SECONDS)
|
||||
.withAuthenticators(new NtlmAuthenticator.Factory())
|
||||
.withDfsEnabled(HostPreferencesFactory.get(host).getBoolean("smb.dfs.enable"))
|
||||
.withEncryptData(HostPreferencesFactory.get(host).getBoolean("smb.encrypt.enable"))
|
||||
.withSigningEnabled(HostPreferencesFactory.get(host).getBoolean("smb.signing.enable"))
|
||||
.withSigningRequired(HostPreferencesFactory.get(host).getBoolean("smb.signing.required"))
|
||||
.withDfsEnabled(preferences.getBoolean("smb.dfs.enable"))
|
||||
.withEncryptData(preferences.getBoolean("smb.encrypt.enable"))
|
||||
.withSigningEnabled(preferences.getBoolean("smb.signing.enable"))
|
||||
.withSigningRequired(preferences.getBoolean("smb.signing.required"))
|
||||
.withRandomProvider(SecureRandomProviderFactory.get().provide())
|
||||
.withMultiProtocolNegotiate(HostPreferencesFactory.get(host).getBoolean("smb.protocol.negotiate.enable"))
|
||||
.withMultiProtocolNegotiate(preferences.getBoolean("smb.protocol.negotiate.enable"))
|
||||
.withTransportLayerFactory(new AsyncDirectTcpTransportFactory<>())
|
||||
.build());
|
||||
final Connection connection = client.connect(getHost().getHostname(), getHost().getPort());
|
||||
@@ -275,7 +274,7 @@ public class SMBSession extends ch.cyberduck.core.Session<Connection> {
|
||||
}
|
||||
else {
|
||||
username = credentials.getUsername();
|
||||
domain = HostPreferencesFactory.get(host).getProperty("smb.domain.default");
|
||||
domain = preferences.getProperty("smb.domain.default");
|
||||
}
|
||||
context = new AuthenticationContext(username, credentials.getPassword().toCharArray(), domain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user