Mailinglist Archive: obs-commits (345 mails)
| < Previous | Next > |
[obs-commits] [PATCH] Added - to the allowed signs in package data
- From: OBS build-service <opensuse-buildservice@xxxxxxxxxxxx>
- Date: Mon, 7 Nov 2011 15:20:24 +0100
- Message-id: <1320675624-6829-1-git-send-email-opensuse-buildservice@opensuse.org>
From: Klaas Freitag <freitag@xxxxxxx>
---
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@xxxxxxxxxxxx
To contact the owner, e-mail: obs-commits+owner@xxxxxxxxxxxx
---
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@xxxxxxxxxxxx
To contact the owner, e-mail: obs-commits+owner@xxxxxxxxxxxx
| < Previous | Next > |