Privacy: Allow email registration when no IS: Make is_url optional in the next_link of the validation email

#2657
This commit is contained in:
manuroe
2019-09-06 10:48:27 +02:00
parent ea847fcc1a
commit a7d704555a
@@ -969,16 +969,31 @@
}
// Check validity of the required parameters
if (!homeserverURL.length || !identityURL.length || !clientSecret.length || !sid.length || !sessionId.length)
if (!homeserverURL.length || !clientSecret.length || !sid.length || !sessionId.length)
{
NSLog(@"[AuthInputsView] setExternalRegistrationParameters failed: wrong parameters");
return NO;
}
// Prepare the registration parameters (Ready to use)
NSURL *identServerURL = [NSURL URLWithString:identityURL];
NSMutableDictionary *threepidCreds = [NSMutableDictionary dictionaryWithDictionary:@{
@"client_secret": clientSecret,
@"sid": sid
}];
if (identityURL)
{
NSURL *identServerURL = [NSURL URLWithString:identityURL];
threepidCreds[@"id_server"] = identServerURL.host;
}
externalRegistrationParameters = @{
@"auth": @{@"session": sessionId, @"threepid_creds": @{@"client_secret": clientSecret, @"id_server": identServerURL.host, @"sid": sid}, @"type": kMXLoginFlowTypeEmailIdentity},
@"auth": @{
@"session": sessionId,
@"threepid_creds": threepidCreds,
@"type": kMXLoginFlowTypeEmailIdentity
},
};
// Hide all inputs by default