MESSENGER-3416 login hashes

This commit is contained in:
Frank Rotermund
2022-09-19 13:03:18 +02:00
parent 5c2bc8dc4b
commit 28200d5cb4
7 changed files with 134 additions and 0 deletions

View File

@@ -978,6 +978,17 @@
if (sender == _submitButton)
{
if (BwiBuildSettings.bwiEnableLoginProtection) {
LoginProtectionService* service = [[LoginProtectionService alloc] init];
service.hashes = BwiBuildSettings.bwiHashes;
if (![service isValid:self->mxRestClient.homeserver]) {
NSError *error = [[NSError alloc] initWithDomain:@"LoginProtectionError" code:0 userInfo:@{
NSLocalizedDescriptionKey: }];
[self onFailureDuringAuthRequest:error];
return;
}
}
// Disable user interaction to prevent multiple requests
self.userInteractionEnabled = NO;