diff options
author | Alexander Golubev <[email protected]> | 2024-01-27 20:10:29 +0300 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-03-04 23:34:44 +0900 |
commit | 15815002b21d6eac129f3f12a0a9f4c294768422 (patch) | |
tree | 3e4ba80ba0a7c4dfed9942ba19fc08a78e90c885 /tdeioslave/sftp/tdeio_sftp.h | |
parent | c5ae0c2aa71a0950c6cf99c35146a3b4684fb167 (diff) | |
download | tdebase-15815002b21d6eac129f3f12a0a9f4c294768422.tar.gz tdebase-15815002b21d6eac129f3f12a0a9f4c294768422.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 <[email protected]>
(cherry picked from commit 581d266ae6f085317b4247b2d1ddbc12c8fa09fb)
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 */ |