From aee56f1c7812d706ca6da7470f4e1ad11bedd4df Mon Sep 17 00:00:00 2001 From: Alex Slynko Date: Wed, 25 Jun 2014 16:44:50 +0100 Subject: [PATCH] [COOK-4740] Add regex validation to task name --- resources/task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/task.rb b/resources/task.rb index 867b8916..8a414bc1 100644 --- a/resources/task.rb +++ b/resources/task.rb @@ -22,7 +22,7 @@ # and not very useful actions :create, :delete, :run, :change -attribute :name, :kind_of => String, :name_attribute => true +attribute :name, :kind_of => String, :name_attribute => true, :regex => [ /\A[^\\\/\:\*\?\<\>\|]+\z/ ] attribute :command, :kind_of => String attribute :cwd, :kind_of => String attribute :user, :kind_of => String, :default => nil