Browse Source

Merge pull request #7236 from vvlladd28/bug/2fa/totp/name

[3.4.2] UI: Fixed not allow whitespace in issuer name at TOTP 2FA provider
pull/7514/head
Andrew Shvayka 4 years ago
committed by GitHub
parent
commit
54f0469fd5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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