forked from mirrors/linphone-iphone
0008093: [Urgent] Critical issue with original provisioning URL being re-accessed
This commit is contained in:
parent
1ff46fe25f
commit
4cc09f5428
1 changed files with 9 additions and 5 deletions
|
|
@ -743,11 +743,9 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[url showError:NSLocalizedString(@"Invalid remote provisioning URL", nil)
|
||||
when:^BOOL(NSString *inputEntry) {
|
||||
if (inputEntry.length > 0) {
|
||||
// missing prefix will result in http:// being used
|
||||
if ([inputEntry rangeOfString:@"://"].location == NSNotFound) {
|
||||
inputEntry = [NSString stringWithFormat:@"http://%@", inputEntry];
|
||||
}
|
||||
return (linphone_core_set_provisioning_uri(LC, inputEntry.UTF8String) != 0);
|
||||
bool isValid = linphone_core_set_provisioning_uri(LC, [self addSchemeToProvisiionninUriIMissing:inputEntry].UTF8String) != 0;
|
||||
linphone_core_set_provisioning_uri(LC,NULL);
|
||||
return isValid;
|
||||
}
|
||||
return TRUE;
|
||||
}];
|
||||
|
|
@ -773,6 +771,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
}
|
||||
|
||||
-(NSString *) addSchemeToProvisiionninUriIMissing:(NSString *)uri {
|
||||
// missing prefix will result in http:// being used
|
||||
return [uri rangeOfString:@"://"].location == NSNotFound ? [NSString stringWithFormat:@"http://%@", uri] : uri;
|
||||
}
|
||||
|
||||
- (void)shouldEnableNextButton {
|
||||
BOOL invalidInputs = NO;
|
||||
for (int i = 0; !invalidInputs && i < ViewElement_TextFieldCount; i++) {
|
||||
|
|
@ -1464,6 +1467,7 @@ void assistant_is_account_linked(LinphoneAccountCreator *creator, LinphoneAccoun
|
|||
[errView addAction:defaultAction];
|
||||
[self presentViewController:errView animated:YES completion:nil];
|
||||
} else {
|
||||
linphone_core_set_provisioning_uri(LC, [self addSchemeToProvisiionninUriIMissing:[self findTextField:ViewElement_URL].text].UTF8String);
|
||||
[self resetLiblinphone:TRUE];
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue