From f269ab3b22eb2500d8d93d613c631b08865b4cc1 Mon Sep 17 00:00:00 2001 From: Marek Date: Thu, 30 Aug 2018 10:03:47 +0200 Subject: [PATCH] Fixes input validation in angular kepyairs. Modifies the regexp used by the angular form validation to match the allowed characters in Nova API as well as the description thereof. Change-Id: I5bb1c1cc531565416efbce16994306cb9ad79000 Closes-bug: #1743887 --- .../static/app/core/keypairs/actions/create.description.html | 3 ++- .../static/app/core/keypairs/actions/create.service.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/static/app/core/keypairs/actions/create.description.html b/openstack_dashboard/static/app/core/keypairs/actions/create.description.html index 28b8ad924b..e65b3b550c 100644 --- a/openstack_dashboard/static/app/core/keypairs/actions/create.description.html +++ b/openstack_dashboard/static/app/core/keypairs/actions/create.description.html @@ -1,5 +1,6 @@

Key Pairs are how you login to your instance after it is launched. Choose a key pair name you will recognize. - Names may only include alphanumeric characters, spaces, or dashes. + Names may only include alphanumeric characters, spaces, dashes and + underscores.

\ No newline at end of file diff --git a/openstack_dashboard/static/app/core/keypairs/actions/create.service.js b/openstack_dashboard/static/app/core/keypairs/actions/create.service.js index c65c6dd414..3f847ccb31 100644 --- a/openstack_dashboard/static/app/core/keypairs/actions/create.service.js +++ b/openstack_dashboard/static/app/core/keypairs/actions/create.service.js @@ -50,7 +50,7 @@ "name": { title: gettext("Key Pair Name"), type: "string", - pattern: "^[A-Za-z0-9 -]+$" + pattern: "^[A-Za-z0-9 -_]+$" } } };