Ticket modified by Randy T at 2011/08/19 17:49
Tracking SystemBugs
CategorySiteMgr
VersionVersion 1.8.001
StatusOpen
ResolutionNone
Completed10%
Priority5 - medium
Created bySonni Nørløv
Created on2011/03/06 21:02
Assigned toKlaus Leithoff, José Luis Gordo Romero
Ccrt.egw@tarantino.us
Summary#2880 - Login though sitemgr looses password information resulting in failing imap login
When logging in at /login.php I can successfully view my emails which are setup to use default imap login, no account specific email accounts exist on the system.
When I login though the login app in sitemgr, the email application cannot authenticate my imap account.
By adding some logging in the mail parts I can see that the value of $GLOBALS[‘egw_info’][‘user’][‘passwd’] is empty when logged in though sitemgr.
Issue is easy to reproduce, so I will open to test patches.
For what it is worth, this issue started after upgrading first from 1.4 to 1.6 and quickly to 1.8. Don’t recall if 1.6 worked.
Comment by Randy T at 2011/08/19 17:49:
Here is the full output with AuthType.
emailadmin_bo::getUserProfile647 User:myUser UserPwd: vs. ImapPassword: Using AuthType/LoginType:/admin
Comment by Randy T at 2011/08/19 17:45:
Here are the results of the debug output
emailadmin_bo::getUserProfile643 User:myUser UserPwd: vs. ImapPassword:
When I have the User Specific profile enabled UserPwd: and ImapPassword: are populated as expected.
Comment by Klaus Leithoff at 2011/08/19 11:11:
To find out if it is passed or not.
Go to emailadmin/inc/class.emailadmin_bo.inc.php.
Function getUserProfile
Line 623
Here the Profiles Password is set with the users Password wich is stored with the session
and provided with $GLOBALS[‘egw_info’][‘user’][‘passwd’]
In Line 625 the loginType is determined.
If the LoginType is admin the password (and LoginInfo) is overwritten with the configured data (see line 639-642)
As far as I know, there is no other place, where the password Information is manipulated/set/retrieved.
So if you put an
error_log(METHOD.LINE.’ User:’.$GLOBALS[‘egw_info’][‘user’][‘account_lid’].’ UserPwd:’.$GLOBALS[‘egw_info’][‘user’][‘passwd’].’ vs. ImapPassword:’.$icServer->password.’ Using AuthType/LoginType:’.$imapAuthType.’/’.$icServer->loginType);
in , say line643. We will see if there is a password at that time.
Comment by Randy T at 2011/08/18 17:58:
It is the only profile. As far as I can tell the connection is good however the authentication was failing as [AUTHENTICATIONFAILED] Authentication failed was returned in the EGW eMail screen.
When I captured the debug sequence I saw the following "myUser@example.com:". Note the password is blank.
To confirm I temporarily made the below change and was able to successfully login. I made the modification on line 518 in class.defaultimap.inc.php. I believe I incorrectly stated the password is not getting passed, however more accurately I tend to believe the password is NULL at the time of the connection.
if($_adminConnection) {
$username = $this->adminUsername;
$password = $this->adminPassword;
$options = '';
$this->isAdminConnection = true;
} else {
$username = $this->loginName;
$password = 'mysupersecretpassword'; //= $this->password;
$options = $_options;
$this->isAdminConnection = false;
}
Comment by Klaus Leithoff at 2011/08/18 17:25:
Thx,
does not look half bad.
Is this the only profile available?
as refering to your debug session:
-does the conection fail
or
-does the login fail.
Example:
is he trying to login with
myUser@example.com:myPassword
or is he trying with
myUser:myPassword
or
myUser@anyotherdomain.suffix:myPassword
If the username is correct like
myUser@example.com
is the password used correct, or is it the password of anonymous, or is it empty
if the password is correct:
does the server info match (,as expected)?
Comment by Randy T at 2011/08/18 17:03:
I have added screenshots of the emailadmin profile. Additionally to clarify with regard to my vmail setup you will see I am using a Standard IMAP Server vs the DBMail Schema. Essentially I have a Dovecot IMAP Server with virtual users reading from a database Table (hash and passwords matching EGW).
Randy
Comment by Klaus Leithoff at 2011/08/18 15:31:
Now I tested with a vmanager Profile.
(Defined for a user)
Still works as it should.
Could you do a screenshot of your emailadmin profile(s)?
(List with profiles available?) And post it with this trackerentry?
Comment by Klaus Leithoff at 2011/08/18 15:12:
Now I tested with a vmanager Profile.
(Defined for a user)
Still works as it should.
Comment by Klaus Leithoff at 2011/08/18 14:57:
I assigned myself. I will check now. Missed it completely
Comment by Randy T at 2011/08/18 13:36:
To clarify this seems to only be an issue when using vmanager.
Comment by Randy T at 2011/08/18 01:08:
I confirmed this issue with Trunk 1.9.011 as well.
Linked entries:
https://community.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2880&no_popup=1