From 736a7fd231ad435a35b76b35fb6fb2ea0a96af0b 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 82c97e3229584..1ab3ed173ce81 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 @@ -248,7 +248,8 @@ class="form-control" name="pseudo" id="pseudo" - formControlName="pseudo"> + formControlName="pseudo" + minlength="2"> This field is required. @@ -258,6 +259,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.39.5