]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: sanitize dashboard user creation 56551/head
authorPedro Gonzalez Gomez <pegonzal@redhat.com>
Thu, 21 Mar 2024 07:56:58 +0000 (08:56 +0100)
committerNizamudeen A <nia@redhat.com>
Thu, 28 Mar 2024 08:31:28 +0000 (14:01 +0530)
Fixes: https://tracker.ceph.com/issues/65030
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
(cherry picked from commit 9951a3a7f314c7cd1eb147fb1b398ac6c5212806)

src/pybind/mgr/dashboard/frontend/src/app/core/auth/auth.module.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html

index 74583431c97a829b5337bf9244ac2438e0d7abcf..eedcdd686021df2ff11824f41b75909fb0916e40 100644 (file)
@@ -3,7 +3,7 @@ import { NgModule } from '@angular/core';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { RouterModule, Routes } from '@angular/router';
 
-import { NgbNavModule, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
+import { NgbModule, NgbNavModule, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
 import { NgxPipeFunctionModule } from 'ngx-pipe-function';
 
 import { ActionLabels, URLVerbs } from '~/app/shared/constants/app.constants';
@@ -27,7 +27,8 @@ import { UserTabsComponent } from './user-tabs/user-tabs.component';
     NgbNavModule,
     NgbPopoverModule,
     NgxPipeFunctionModule,
-    RouterModule
+    RouterModule,
+    NgbModule
   ],
   declarations: [
     LoginComponent,
index ddb0e6ab8aeb6bb1f22b3eae43283a98c71ab19b..4169d54c39fa46de376fbd879d88a4714620e03e 100644 (file)
                    name="username"
                    formControlName="username"
                    autocomplete="off"
-                   autofocus>
+                   autofocus
+                   ngbTooltip="White spaces at the beginning and end will be trimmed"
+                   i18n-ngbTooltip
+                   cdTrim>
             <span class="invalid-feedback"
                   *ngIf="userForm.showError('username', formDir, 'required')"
                   i18n>This field is required.</span>