mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Store passwords encrypted
This commit is contained in:
@@ -294,13 +294,13 @@ public class ServiceSend extends LifecycleService {
|
||||
// Connect transport
|
||||
db.identity().setIdentityState(ident.id, "connecting");
|
||||
try {
|
||||
itransport.connect(ident.host, ident.port, ident.user, ident.password);
|
||||
itransport.connect(ident.host, ident.port, ident.user, ident.getPassword());
|
||||
} catch (AuthenticationFailedException ex) {
|
||||
if (ident.auth_type == Helper.AUTH_TYPE_GMAIL) {
|
||||
EntityAccount account = db.account().getAccount(ident.account);
|
||||
ident.password = Helper.refreshToken(this, "com.google", ident.user, account.password);
|
||||
ident.setPassword(Helper.refreshToken(this, "com.google", ident.user, account.getPassword()));
|
||||
DB.getInstance(this).identity().setIdentityPassword(ident.id, ident.password);
|
||||
itransport.connect(ident.host, ident.port, ident.user, ident.password);
|
||||
itransport.connect(ident.host, ident.port, ident.user, ident.getPassword());
|
||||
} else
|
||||
throw ex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user