]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Fix iSCSI's username and password validation
authorTiago Melo <tmelo@suse.com>
Mon, 16 Mar 2020 21:23:47 +0000 (20:23 -0100)
committerTiago Melo <tmelo@suse.com>
Tue, 7 Apr 2020 14:20:05 +0000 (14:20 +0000)
commit532b271572f7b6410c099362dc046148f5a686a1
tree012706e21c34b7bdc46e591a8a06db4a105412d2
parentda52df8a8dbc11ee0b077fd2f9db711ce8f3df92
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>
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