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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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}, [ |
|
|
|
|