Summary: | [regression] can't cancel password input | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Thomas Zander <zander> |
Component: | IMAP | Assignee: | Will Stephenson <wstephenson> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dirk.heinrichs.ext, itlistuser, mi+kde, pihhan, richlv, stealth.banana, thomas.coopman, vapier |
Priority: | NOR | ||
Version: | 1.7.50 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
proposed patch part 1, allow cancel
patch 2, don't ask for password due to missing SSL/TLS |
Description
Thomas Zander
2004-11-13 09:45:41 UTC
*** Bug has been marked as fixed ***. I see the same problem today (REGRESSION?) with 3.5.2-1+b1 from debian/unstable Bug is still there *** Bug 109036 has been marked as a duplicate of this bug. *** *** Bug 116438 has been marked as a duplicate of this bug. *** *** Bug 136646 has been marked as a duplicate of this bug. *** *** Bug 107836 has been marked as a duplicate of this bug. *** Same problem with kmail 1.9.6. Selected not supported login method (e.g. CRAM-MD5 instead of Simple Text) then password dialog cannot be cancelled. After restarting (with checking mail on start enabled) it is even difficult to reach the relevant setting then when the password dialog cannot be cancelled. Exactly the same problem for me, when not connecting via TLS (because the server is configured to reject unless a secure session is being used). Sequence of events: 1) ask for password 2) say that LOGIN is disabled 3) goto 1 I'll probably fix it by editing the configuration manually, but this is a major pain :) *** Bug 142030 has been marked as a duplicate of this bug. *** *** Bug 142330 has been marked as a duplicate of this bug. *** *** Bug 120660 has been marked as a duplicate of this bug. *** The problem is still present in the latest KDE released with OpenSuSE 10.2, KMail 1.9.5. But it just shows up if you type your password for the first time. If you cancel on the dialog box before the kamil window opens, then it will be possible to make the changes. This is a real bug and a real PITA when a user gets this problem. If the problem is based on wrong credentials, this might help. My problem was a server that switched the authentication mechanism. KMail did not allow me to open the configuration dialog and change the settings due to this bug. That was the same case here. The server changed from using TLS to using SSL on the right port (IMAPS). Created attachment 20116 [details]
proposed patch part 1, allow cancel
Created attachment 20117 [details]
patch 2, don't ask for password due to missing SSL/TLS
Downstream report at https://bugzilla.novell.com/show_bug.cgi?id=247903 SVN commit 653900 by wstephens: Allow the user to cancel kmail connection attempts when the account settings are incorrect (Novell bug 247903). BUG:93199 M +2 -2 kioslaves/imap4/imap4.cc M +20 -13 kmail/imapaccountbase.cpp --- branches/KDE/3.5/kdepim/kioslaves/imap4/imap4.cc #653899:653900 @@ -2020,14 +2020,14 @@ } } if (!clientLogin (myUser, myPass, resultInfo)) - error(KIO::ERR_COULD_NOT_LOGIN, i18n("Unable to login. Probably the " + error(KIO::ERR_COULD_NOT_AUTHENTICATE, i18n("Unable to login. Probably the " "password is wrong.\nThe server %1 replied:\n%2").arg(myHost).arg(resultInfo)); } else { #ifdef HAVE_LIBSASL2 if (!clientAuthenticate (this, authInfo, myHost, myAuth, mySSL, resultInfo)) - error(KIO::ERR_COULD_NOT_LOGIN, i18n("Unable to authenticate via %1.\n" + error(KIO::ERR_COULD_NOT_AUTHENTICATE, i18n("Unable to authenticate via %1.\n" "The server %2 replied:\n%3").arg(myAuth).arg(myHost).arg(resultInfo)); else { myUser = authInfo.username; --- branches/KDE/3.5/kdepim/kmail/imapaccountbase.cpp #653899:653900 @@ -562,19 +562,19 @@ if (aSlave != mSlave) return; handleError( errorCode, errorMsg, 0, QString::null, true ); if ( mAskAgain ) - makeConnection(); - else { - if ( !mSlaveConnected ) { - mSlaveConnectionError = true; - resetConnectionList( this ); - if ( mSlave ) - { - KIO::Scheduler::disconnectSlave( slave() ); - mSlave = 0; - } + if ( makeConnection() != ImapAccountBase::Error ) + return; + + if ( !mSlaveConnected ) { + mSlaveConnectionError = true; + resetConnectionList( this ); + if ( mSlave ) + { + KIO::Scheduler::disconnectSlave( slave() ); + mSlave = 0; } - emit connectionResult( errorCode, errorMsg ); } + emit connectionResult( errorCode, errorMsg ); } //----------------------------------------------------------------------------- @@ -892,7 +892,7 @@ bool jobsKilled = true; switch( errorCode ) { case KIO::ERR_SLAVE_DIED: slaveDied(); killAllJobs( true ); break; - case KIO::ERR_COULD_NOT_LOGIN: // bad password + case KIO::ERR_COULD_NOT_AUTHENTICATE: // bad password mAskAgain = true; // fallthrough intended case KIO::ERR_CONNECTION_BROKEN: @@ -901,6 +901,7 @@ // These mean that we'll have to reconnect on the next attempt, so disconnect and set mSlave to 0. killAllJobs( true ); break; + case KIO::ERR_COULD_NOT_LOGIN: case KIO::ERR_USER_CANCELED: killAllJobs( false ); break; @@ -1042,7 +1043,7 @@ msg->deleteBodyParts(); // make the parts and fill the mBodyPartList constructParts( stream, 1, 0, 0, msg->asDwMessage() ); - if ( mBodyPartList.count() == 1 ) // we directly set the body later + if ( mBodyPartList.count() == 1 ) // we directly set the body later, at partsToLoad below msg->deleteBodyParts(); if ( !as ) @@ -1068,6 +1069,12 @@ ++partsToLoad; } } + // if the only body part is not text, part->loadPart() would return false + // and that part is never loaded, so make sure it loads. + // it seems that TEXT does load the single body part even if it is not text/* + if ( mBodyPartList.count() == 1 && partsToLoad == 0 ) + partsToLoad = 1; + if ( (mBodyPartList.count() * 0.5) < partsToLoad ) { // more than 50% of the parts have to be loaded anyway so it is faster |