MOBILE-3859 login: Fix missing await when check if URL allowed

main
Dani Palou 2021-09-14 13:35:26 +02:00
parent d2e185a2ed
commit 83ff9efbd8
1 changed files with 6 additions and 1 deletions

View File

@ -498,7 +498,12 @@ export class CoreLoginSitePage implements OnInit {
if (scheme && scheme != 'http' && scheme != 'https') {
CoreDomUtils.showErrorModal(Translate.instant('core.errorurlschemeinvalidscheme', { $a: text }));
} else if (CoreLoginHelper.isSiteUrlAllowed(text)) {
return;
}
const allowed = await CoreLoginHelper.isSiteUrlAllowed(text);
if (allowed) {
// Put the text in the field (if present).
this.siteForm.controls.siteUrl.setValue(text);