Always encrypt the db for new users. (#2692)

This commit is contained in:
Doug 2024-04-12 18:00:49 +01:00 committed by GitHub
parent 4d513f9ed1
commit d6b5c07ee6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,12 +27,7 @@ class AuthenticationServiceProxy: AuthenticationServiceProxyProtocol {
var homeserver: CurrentValuePublisher<LoginHomeserver, Never> { homeserverSubject.asCurrentValuePublisher() }
init(userSessionStore: UserSessionStoreProtocol, encryptionKeyProvider: EncryptionKeyProviderProtocol, appSettings: AppSettings) {
let passphrase = appSettings.isDevelopmentBuild ? encryptionKeyProvider.generateKey().base64EncodedString() : nil
if passphrase != nil {
MXLog.info("Testing database encryption in development build.")
}
self.passphrase = passphrase
passphrase = encryptionKeyProvider.generateKey().base64EncodedString()
self.userSessionStore = userSessionStore
homeserverSubject = .init(LoginHomeserver(address: appSettings.defaultHomeserverAddress,