From 4eb80096bfa50f286ad83aa6d637f9b9ec5fd39d Mon Sep 17 00:00:00 2001 From: Ivan Lausuch Date: Mon, 20 May 2019 14:02:41 +0200 Subject: [PATCH] crowbar: Modify regex of group names to forbid dots Group names cannot contain dots because it conflicts with the url route /nodes/groups/1.0/:id/:group(.:format) Now JS doesn't allow dots in the group names More info at https://jira.suse.com/browse/SOC-8011 --- .../app/assets/javascripts/barclamps/crowbar/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowbar_framework/app/assets/javascripts/barclamps/crowbar/application.js b/crowbar_framework/app/assets/javascripts/barclamps/crowbar/application.js index 2558183ec7..ea18e6feef 100644 --- a/crowbar_framework/app/assets/javascripts/barclamps/crowbar/application.js +++ b/crowbar_framework/app/assets/javascripts/barclamps/crowbar/application.js @@ -30,7 +30,7 @@ jQuery(document).ready(function($) { $('#group-invalid').html() ); - if ($input.val().match(/^[a-zA-Z][a-zA-Z0-9._:-]+$/)) { + if ($input.val().match(/^[a-zA-Z][a-zA-Z0-9_:-]+$/)) { $('#nodegroups').append( groupTemplate({ group: $input.val()