| Summary: | FTP KIO slave often forgets password | ||
|---|---|---|---|
| Product: | [Unmaintained] kio | Reporter: | Martin Pärtel <martin.partel> |
| Component: | ftp | Assignee: | David Faure <faure> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | lotorev |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | OpenBSD | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 4.7 | |
| Sentry Crash Report: | |||
|
Description
Martin Pärtel
2006-03-31 23:23:44 UTC
Discovered a "workaround": log in to an FTP site, enter a directory and immediately go up one directory, re-enter the password (without checking Keep password). After this, the password does not seem to "time out". Keep password = store it in KWallet. Since you are not using KWallet, the password is lost in oblivion. Let me describe my problem, that can confirm this bug. I setup a ftp server with proper user login name and empty password. If I contact it from client via konqueror (all KDE versions from SuSE 9.2 up to SuSE 10.2), login name is specified in addres, it will ask me for password even I check "remember password ...". Additional info:
since empty password can be still valid, check extra
in kdelibs/kioslave/ftp/ftp.cc
bool Ftp::ftpLogin()
...
bool missing_password = false;
AuthInfo info;
info.url.setProtocol( "ftp" );
info.url.setHost( m_host );
info.url.setPort( m_port );
// Try anonymous login if both username/password
// information is blank.
if (user.isEmpty() && pass.isEmpty())
{
user = FTP_LOGIN;
pass = FTP_PASSWD;
}
else if (!user.isEmpty() && pass.isEmpty())
{
info.verifyPath = true;
info.username = user;
missing_password = !checkCachedAuthentication( info ) )
info.username = "";
}
info.url.setUser( user );
QByteArray tempbuf;
int failedAuth = 0;
do
{
// Check the cache and/or prompt user for password if 1st
// login attempt failed OR the user supplied a login name,
// but no password.
if ( failedAuth > 0 || missing_password )
{
QString errorMsg;
kDebug(7102) << "Prompting user for login info..." << endl;
// Ask user if we should retry after when login fails!
if( failedAuth > 0 )
{
errorMsg = i18n("Message sent:\nLogin using username=%1 and "
"password=[hidden]\n\nServer replied:\n%2\n\n"
, user, ftpResponse(0));
}
if ( user != FTP_LOGIN )
info.username = user;
info.prompt = i18n("You need to supply a username and a password "
"to access this site.");
info.commentLabel = i18n( "Site:" );
info.comment = i18n("<b>%1</b>", m_host );
info.keepPassword = true; // Prompt the user for persistence as well.
info.readOnly = (!m_user.isEmpty() && m_user != FTP_LOGIN);
bool disablePassDlg = config()->readEntry( "DisablePassDlg", false );
if ( disablePassDlg || !openPasswordDialog( info, errorMsg ) )
{
error( ERR_USER_CANCELED, m_host );
return false;
}
else
{
user = info.username;
pass = info.password;
}
}
tempbuf = "user ";
*** Bug 268629 has been marked as a duplicate of this bug. *** Git commit 3ab6c7f05f113353435e10b6d6fd0fdbbd495855 by Dawit Alemayehu. Committed on 22/04/2011 at 03:40. Pushed by adawit into branch 'master'. Fixed most of the issue related to login. BUG: 258888 BUG: 99686 BUG: 143488 BUG: 124675 FIXED-IN: 4.7 REVIEW: 101173 M +83 -33 kioslave/ftp/ftp.cpp M +3 -1 kioslave/ftp/ftp.h http://commits.kde.org/kdelibs/3ab6c7f05f113353435e10b6d6fd0fdbbd495855 |