diff --git a/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java b/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java index 3450378851a..7e9ed07165e 100644 --- a/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java +++ b/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java @@ -185,6 +185,9 @@ protected int getOAuthPort(final Host bookmark) { if(-1 != URI.create(bookmark.getProtocol().getOAuthTokenUrl()).getPort()) { return URI.create(bookmark.getProtocol().getOAuthTokenUrl()).getPort(); } + if(null == URI.create(bookmark.getProtocol().getOAuthTokenUrl()).getScheme()) { + return bookmark.getPort(); + } return Scheme.valueOf(URI.create(bookmark.getProtocol().getOAuthTokenUrl()).getScheme()).getPort(); }