]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Fix iSCSI's username and password validation 34547/head
authorTiago Melo <tmelo@suse.com>
Mon, 16 Mar 2020 21:23:47 +0000 (20:23 -0100)
committerTiago Melo <tmelo@suse.com>
Tue, 14 Apr 2020 12:41:20 +0000 (12:41 +0000)
commiteb98e652b6c96316a0374da08d1d2bd0e33cdd43
treed7a6c6221f99ae308873a6464ca9a906770132f9
parentd4ceacb715056423d30fd9937fff109ce8bf5f9d
mgr/dashboard: Fix iSCSI's username and password validation

When using regex, instead of strings, angular doesn't assume the pattern must
validate the entire string.

Add validation to the backend.

Fixes: https://tracker.ceph.com/issues/44624
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit 532b271572f7b6410c099362dc046148f5a686a1)
src/pybind/mgr/dashboard/controllers/iscsi.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.ts
src/pybind/mgr/dashboard/frontend/src/testing/unit-test-helper.ts
src/pybind/mgr/dashboard/tests/test_iscsi.py