Fixed bug 2194492 : allow space in password

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@160 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2008-11-04 01:58:08 +00:00
parent 7ba856827b
commit e49c103770
2 changed files with 4 additions and 3 deletions

View File

@ -106,7 +106,8 @@ public class PopConnection extends AbstractConnection {
} else if (!tokens.hasMoreTokens()) {
sendERR("invalid syntax");
} else {
password = tokens.nextToken();
// bug 2194492 : allow space in password
password = line.substring("PASS".length()+1);
try {
session = ExchangeSessionFactory.getInstance(userName, password);
messages = session.getAllMessages();

View File

@ -48,12 +48,12 @@ public class SmtpConnection extends AbstractConnection {
if (state == LOGIN) {
// AUTH LOGIN, read userName
userName = base64Decode(command);
userName = base64Decode(line);
sendClient("334 " + base64Encode("Password:"));
state = PASSWORD;
} else if (state == PASSWORD) {
// AUTH LOGIN, read password
password = base64Decode(command);
password = base64Decode(line);
authenticate();
} else if ("QUIT".equalsIgnoreCase(command)) {
sendClient("221 Closing connection");