Community
Participate
Working Groups
Create an ssh connection to build.eclipse.org, choose "Launch Shell". Have an SSH private key available and configured. On the Username prompt, enter an invalid username (and invalid password). The SSH Connector Service will do another interactive prompt for the password, and when pressing "Cancel" a "Keyboard Interactive" authentication will also be tried. When that is also canceled, RSE shows an "Auth Cancel" error message. Correct behavior would be to cancel the login without further messages when the user chooses cancel.
Moreover, the incorrect username gets saved and it is not easy to correct the username on subsequent tries (need to clear it or change it in properties or use the "Connect..." action).
Moreover, on Linux an exception ("Auth Cancel") is printed to stdout when the user cancels the authentication.
Martin, what should be the expected behaviour?
(In reply to comment #3) From the description: "Correct behavior would be to cancel the login without further messages when the user chooses cancel." from comment #1: "Also don't save any credentials when the user chooses cancel." from comment #2: "Never print any errors to stdout. Best avoid any errors if possible e.g. by not allowing invalid input. If this can't be done, then inform the user with a dialog about errors. If the error is not important enough, then just log it to the Eclipse Error Log. In the concrete case, "Auth Cancel" should be silently ignored and nowhere logged since the user manually chose cancel so the system is already doing what the user wants." Is that clear enough? - I'm fine if not all 3 conditions of satisfaction can be met right away, just fixing the first issue for now would be fine, the others can be tracked separately if necessary.
Thanks a lot. BTW, I wasn't able to get that "Auth Cancel" error message shown.
Yeah... maybe that was fixed with some other bug along the way. Are you going to take on this bug and try to come up with a patch?
Created attachment 97670 [details] patch for SystemCommandAction I, Anna Dushistova, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer to make this contribution under the EPL.
Patch applied with one minor modification (directly catch OperationCanceledException rather than doing instanceof). Thanks! When testing, I saw that in the following case: Select file subsystem, right-click > connect... Enter invalid password on SSH dialog, press cancel Following exception is printed to the log: org.eclipse.core.runtime.OperationCanceledException at org.eclipse.rse.internal.connectorservice.ssh.SshConnectorService.internalConnect(SshConnectorService.java:193) at org.eclipse.rse.core.subsystems.AbstractConnectorService.connect(AbstractConnectorService.java:412) at org.eclipse.rse.core.subsystems.SubSystem.connect(SubSystem.java:2402) at org.eclipse.rse.internal.ui.actions.SystemConnectAction$ConnectJob.run(SystemConnectAction.java:56) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Keeping the bug open to fix that one as well.
(In reply to comment #8) Fixed the issue in SystemConnectAction. Now, when I "Launch Terminal" and cancel in the SSH dialog (due to invalid password) I get this in the error log: org.eclipse.core.runtime.OperationCanceledException at org.eclipse.rse.internal.connectorservice.ssh.SshConnectorService.internalConnect(SshConnectorService.java:193) at org.eclipse.rse.core.subsystems.AbstractConnectorService.connect(AbstractConnectorService.java:412) at org.eclipse.rse.core.subsystems.SubSystem.connect(SubSystem.java:2402) at org.eclipse.rse.internal.terminals.ui.actions.LaunchTerminalAction.run(LaunchTerminalAction.java:239) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) [...]
Fixed that one in LaunchTerminalAction
Now, when I expand the My Home Filter and press cancel in SSH, I get an "Empty List" subnode. When I select "My Home" again and press Refresh, I get the login dialog; if I cancel, I get the login dialog again. Login dialog should appear once only.
Hm... that one is harder. Here is a stack trace: SubSystem.checkIsConnected() -> throws SystemMessageException RemoteFileSubSystem.getTargetForFilter(ISystemFilterReference) -> eats the exception silently, but returns null SystemView$ResourceChangedJob.runInUIThread(IProgressMonitor) line 2207 -> doesnt know that it was canceled and tries to continue DaveM, I think that's a problem which only you can finish... thanks
Looks like second time we pop into connect from here: AbstractSystemViewAdapter.fetchDeferredChildren() DeferredTreeContentManager$1.run(IProgressMonitor)
Marking this fixed in order to close off our IP Log. Remaining issue as per comment #11 will be tracked in bug 231964.
*** Bug 181480 has been marked as a duplicate of this bug. ***