Hi.
A Quote (api/src/Mail/Credentials.php):
/**
* Password in cleartext
*/
const CLEARTEXT = 0;
/**
* Password encrypted with user password
*
* MCrypt algo 'tripledes' and mode 'ecb' or OpenSSL 'des-ede3'
* Key is direct user password, key-size 24 (truncated to 23 byte, if greater then 24 byte!)
*/
const USER = 1;
/**
* Password encrypted with system secret
*
* MCrypt algo 'tripledes' and mode 'ecb' or OpenSSL 'des-ede3'
* Key is direct system secret, key-size 24 (truncated to 23 byte, if greater then 24 byte!)
*/
const SYSTEM = 2;
/**
* Password encrypted with user password
*
* OpenSSL: AES-128-CBC, with key generated via hash_pbkdf2 sha256 hash and 12 byte binary salt (=16 char base64)
*/
const USER_AES = 3;
/**
* Password encrypted with system secret
*
* OpenSSL: AES-128-CBC, with key generated via hash_pbkdf2 sha256 hash and 12 byte binary salt (=16 char base64)
*/
const SYSTEM_AES = 4;
It’s a session thing, but not as you think, because it works, when database -> egw_ea_credentials -> cred_pw_enc -> 4 -> SYSTEM_AES
and it does not work with database -> egw_ea_credentials -> cred_pw_enc -> 3 -> USER_AES
I’ve tried it with a clean egw installation, with only 1 additional user and tested it (changing cred_pw_enc by edit mailaccounts).
And have a “production” system, where i have users where it works -> when i create the mailaccount by admin -> cred_pw_enc -> 4,
it not works -> when the user edit his profile by himselfe cred_pw_enc -> 3.
So i think, that the encryption with userpassword does not work, because the userpassword is not used to decrypt or create a session.
Or does it work in your system?
Rgds.