Browse Source

UI: Fixed not allow whitespace in issuer name at TOTP 2FA provider

pull/7236/head
Vladyslav_Prykhodko 4 years ago
parent
commit
e083966117
  1. 2
      ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.ts

2
ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.ts

@ -192,7 +192,7 @@ export class TwoFactorAuthSettingsComponent extends PageComponent implements OnI
};
switch (provider) {
case TwoFactorAuthProviderType.TOTP:
formControlConfig.issuerName = [{value: 'ThingsBoard', disabled: true}, [Validators.required, Validators.pattern(/^\S+$/)]];
formControlConfig.issuerName = [{value: 'ThingsBoard', disabled: true}, [Validators.required, Validators.pattern(/^(?!^\s+$).*$/)]];
break;
case TwoFactorAuthProviderType.SMS:
formControlConfig.smsVerificationMessageTemplate = [{value: 'Verification code: ${code}', disabled: true}, [

Loading…
Cancel
Save