Cyberduck Mountain Duck CLI

Changeset 43554


Ignore:
Timestamp:
Dec 12, 2017 1:18:12 PM (6 months ago)
Author:
dkocher
Message:

Read keychain setting from credential input prompt. Fix #10159.

Location:
shelves/12.2017
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • shelves/12.2017

    • Property subgit:lock changed from commit:984d467f5575b2fbbedf45b0f4a2cc9063d9b18b timestamp:2017-12-12T12:14:27.854 to commit:2916f17d2a38351defdbd7480382413ad6d0ca41 timestamp:2017-12-12T13:18:35.605
  • shelves/12.2017/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPasswordAuthentication.java

    r43477 r43554  
    5555    public Boolean authenticate(final Host bookmark, final HostPasswordStore keychain, final LoginCallback callback, final CancelCallback cancel)
    5656        throws BackgroundException {
    57         if(StringUtils.isBlank(bookmark.getCredentials().getPassword())) {
    58             bookmark.getCredentials().setPassword(callback.prompt(bookmark, bookmark.getCredentials().getUsername(),
     57        final Credentials credentials = bookmark.getCredentials();
     58        if(StringUtils.isBlank(credentials.getPassword())) {
     59            final Credentials input = callback.prompt(bookmark, credentials.getUsername(),
    5960                String.format("%s %s", LocaleFactory.localizedString("Login", "Login"), bookmark.getHostname()),
    6061                MessageFormat.format(LocaleFactory.localizedString(
    6162                    "Login {0} with username and password", "Credentials"), BookmarkNameProvider.toString(bookmark)),
    6263                new LoginOptions(bookmark.getProtocol()).publickey(false)
    63                     .usernamePlaceholder(bookmark.getCredentials().getUsername())).getPassword());
     64                    .usernamePlaceholder(credentials.getUsername()));
     65            credentials.setSaved(input.isSaved());
     66            credentials.setPassword(input.getPassword());
    6467        }
    65         return this.authenticate(bookmark, bookmark.getCredentials(), callback, cancel);
     68        return this.authenticate(bookmark, credentials, callback, cancel);
    6669    }
    6770
Note: See TracChangeset for help on using the changeset viewer.
swiss made software