Implement RFC 2595 LOGINDISABLED
Warn the user and abort when we attempt a plaintext login, but the server has explicitly disabled plaintext logins. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
19ff636390
commit
1ac9dc7fb4
@ -20,6 +20,10 @@ New Features
|
|||||||
future. Starting with this version, OfflineImap will be
|
future. Starting with this version, OfflineImap will be
|
||||||
forward-compatible with the per-account locking style.
|
forward-compatible with the per-account locking style.
|
||||||
|
|
||||||
|
* Implement RFC 2595 LOGINDISABLED. Warn the user and abort when we
|
||||||
|
attempt a plaintext login but the server has explicitly disabled
|
||||||
|
plaintext logins rather than crashing.
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
-------
|
-------
|
||||||
|
|
||||||
@ -30,8 +34,3 @@ Bug Fixes
|
|||||||
|
|
||||||
* New emails are not created with "-rwxr-xr-x" but as "-rw-r--r--"
|
* New emails are not created with "-rwxr-xr-x" but as "-rw-r--r--"
|
||||||
anymore, fixing a regression in 6.3.4.
|
anymore, fixing a regression in 6.3.4.
|
||||||
|
|
||||||
Pending for the next major release
|
|
||||||
==================================
|
|
||||||
|
|
||||||
* UIs get shorter and nicer names. (API changing)
|
|
||||||
|
@ -262,6 +262,12 @@ class IMAPServer:
|
|||||||
except imapobj.error, val:
|
except imapobj.error, val:
|
||||||
self.plainauth(imapobj)
|
self.plainauth(imapobj)
|
||||||
else:
|
else:
|
||||||
|
# Use plaintext login, unless
|
||||||
|
# LOGINDISABLED (RFC2595)
|
||||||
|
if 'LOGINDISABLED' in imapobj.capabilities:
|
||||||
|
raise OfflineImapError("Plaintext login "
|
||||||
|
"disabled by server. Need to use SSL?",
|
||||||
|
OfflineImapError.ERROR.REPO)
|
||||||
self.plainauth(imapobj)
|
self.plainauth(imapobj)
|
||||||
# Would bail by here if there was a failure.
|
# Would bail by here if there was a failure.
|
||||||
success = 1
|
success = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user