diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-01-27 20:10:29 +0300 |
---|---|---|
committer | TDE Gitea <gitea@mirror.git.trinitydesktop.org> | 2024-03-04 11:04:11 +0000 |
commit | 581d266ae6f085317b4247b2d1ddbc12c8fa09fb (patch) | |
tree | df97b702f24748dca300192385a889153573fb71 /tdeioslave/sftp/tdeio_sftp.h | |
parent | 2756ae762fefc3fe86463174866674a987856d89 (diff) | |
download | tdebase-581d266ae6f085317b4247b2d1ddbc12c8fa09fb.tar.gz tdebase-581d266ae6f085317b4247b2d1ddbc12c8fa09fb.zip |
tdeioslave/sftp: pass correct username to openPassDlg()
We should always pass to the openPassDlg() exactly the same username
otherwise it may result in incorrect caching of passwords especially in
case if the username is changed by the user.
Also don't allow username change in case it was passed to setHost()
(i.e. it was specified in the URL like e.g. sftp://username@host/).
In such a case after changing it'd be impossible to properly cache it.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'tdeioslave/sftp/tdeio_sftp.h')
-rw-r--r-- | tdeioslave/sftp/tdeio_sftp.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tdeioslave/sftp/tdeio_sftp.h b/tdeioslave/sftp/tdeio_sftp.h index 66a348e68..747294782 100644 --- a/tdeioslave/sftp/tdeio_sftp.h +++ b/tdeioslave/sftp/tdeio_sftp.h @@ -123,9 +123,13 @@ private: // Private variables /** The sftp session for the connection */ sftp_session mSftp; - /** Username to use when connecting */ + /** Username to use when connecting, Note: it's the one passed in the URL */ TQString mUsername; + /** Username to use with the next connection attempt: it's either from the cached data or from + * the password dialog that was prompted to the user. */ + TQString mCachedUsername; + /** User's password. Note: the password would be set only if it was somehow cached: passed to * setHost(), received from passwdserver's cache or was entered by user before reconnection */ |