From: Klaas Freitag
---
src/webui/app/controllers/package_controller.rb | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/webui/app/controllers/package_controller.rb b/src/webui/app/controllers/package_controller.rb
index 89d8bcd..00be3bc 100644
--- a/src/webui/app/controllers/package_controller.rb
+++ b/src/webui/app/controllers/package_controller.rb
@@ -248,21 +248,21 @@ class PackageController < ApplicationController
def check_params
logger.debug "Checking parameter #{params[:name]}"
if params[:name]
- unless params[:name] =~ /^\w\w*$/
+ unless params[:name] =~ /^\w[-\w]*$/
flash[:error] = "Invalid package name, may only contain alphanumeric characters"
redirect_to :action => :new
end
end
if params[:project]
- unless params[:project] =~ /^\w\w*$/
+ unless params[:project] =~ /^\w[-\w]*$/
flash[:error] = "Invalid project name, may only contain alphanumeric characters"
redirect_to :action => :new
end
end
if params[:package]
- unless params[:package] =~ /^\w\w*$/
+ unless params[:package] =~ /^\wi[-\w]*$/
flash[:error] = "Invalid package name, may only contain alphanumeric characters"
redirect_to :action => :new
end
--
1.7.7
--
To unsubscribe, e-mail: obs-commits+unsubscribe@opensuse.org
To contact the owner, e-mail: obs-commits+owner@opensuse.org