summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpengyuesheng <pengyuesheng@gohighsec.com>2019-04-04 14:48:40 +0800
committerAkihiro Motoki <amotoki@gmail.com>2019-10-18 13:58:27 +0900
commit4343aaa9a2aac370f2f32ecf24d5936982b91fc2 (patch)
treee0062ef0cb643a823b57e90d1151d24467b3ec13
parent77b0242fa2ce64ab77ea7e4ee7a8530de044967e (diff)
downloadhorizon-4343aaa9a2aac370f2f32ecf24d5936982b91fc2.tar.gz
Modify the regex for name on import public key form
This patch fix does not match the regex in horizon and nova [1]. The service supports underscores, but the restriction imposed in horizon is different, so the regex is updated. [1] https://github.com/openstack/nova/blob/6ebb2c4cae65cb437e17a8c02fe5174a9825d8e0/nova/compute/api.py#L5674-L5690 Closes-Bug: #1848383 Change-Id: Icc5e9c6447253d6087c578ab931b52a923128e38 (cherry picked from commit 42349acc2fa08cadb8d37616d0262838c4629039)
-rw-r--r--openstack_dashboard/static/app/core/keypairs/actions/import.service.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack_dashboard/static/app/core/keypairs/actions/import.service.js b/openstack_dashboard/static/app/core/keypairs/actions/import.service.js
index 4b03b6c7e..f50386ee5 100644
--- a/openstack_dashboard/static/app/core/keypairs/actions/import.service.js
+++ b/openstack_dashboard/static/app/core/keypairs/actions/import.service.js
@@ -49,7 +49,7 @@
"name": {
title: gettext("Key Pair Name"),
type: "string",
- pattern: "^[A-Za-z0-9 -]+$"
+ pattern: "^[A-Za-z0-9 _-]+$"
},
"key_type": {
title: gettext("Key Type"),