From 993421b3226067e22225bdd5007156e15181d28e Mon Sep 17 00:00:00 2001 From: avanthakkar Date: Fri, 6 Oct 2023 19:10:48 +0530 Subject: [PATCH] mgr/dashboard: add path validation for pseudo path of nfs export Fixes: https://tracker.ceph.com/issues/63124 Signed-off-by: avanthakkar (cherry picked from commit adeea099a57d34a63b483899a40c22b7bfb8c999) --- .../src/app/ceph/nfs/nfs-form/nfs-form.component.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html index b9593a5c2680..f54361a5f7d1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html @@ -259,7 +259,8 @@ class="form-control" name="pseudo" id="pseudo" - formControlName="pseudo"> + formControlName="pseudo" + minlength="2"> This field is required. @@ -269,6 +270,9 @@ Pseudo needs to start with a '/' and can't contain any of the following: >, <, |, &, ( or ). + Pseudo path should be an absolute path and it cannot be just '/' -- 2.47.3