]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Fix iSCSI's username and password validation 34550/head
authorTiago Melo <tmelo@suse.com>
Mon, 16 Mar 2020 21:23:47 +0000 (20:23 -0100)
committerTiago Melo <tmelo@suse.com>
Mon, 20 Apr 2020 09:16:48 +0000 (09:16 +0000)
commite9020472685bad28888e080ca9668894a10bed4f
treed81d5847610428da98367b340bbce891ced045fe
parentf8781be9d8f88d1f903a0bddf9e1a05b5024f263
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