From: Pedro Gonzalez Gomez Date: Thu, 21 Mar 2024 07:56:58 +0000 (+0100) Subject: mgr/dashboard: sanitize dashboard user creation X-Git-Tag: v20.0.0~2308^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56357%2Fhead;p=ceph.git mgr/dashboard: sanitize dashboard user creation Fixes: https://tracker.ceph.com/issues/65030 Signed-off-by: Pedro Gonzalez Gomez --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/auth.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/auth.module.ts index 74583431c97a..eedcdd686021 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/auth.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/auth.module.ts @@ -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, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html index ddb0e6ab8aeb..4169d54c39fa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html @@ -23,7 +23,10 @@ name="username" formControlName="username" autocomplete="off" - autofocus> + autofocus + ngbTooltip="White spaces at the beginning and end will be trimmed" + i18n-ngbTooltip + cdTrim> This field is required.