From: Cornelius Schumacher
---
src/webui/app/controllers/package_controller.rb | 6 +++---
src/webui/app/views/package/error.rhtml | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
create mode 100644 src/webui/app/views/package/error.rhtml
diff --git a/src/webui/app/controllers/package_controller.rb b/src/webui/app/controllers/package_controller.rb
index 00be3bc..258fccb 100644
--- a/src/webui/app/controllers/package_controller.rb
+++ b/src/webui/app/controllers/package_controller.rb
@@ -250,21 +250,21 @@ class PackageController < ApplicationController
if params[:name]
unless params[:name] =~ /^\w[-\w]*$/
flash[:error] = "Invalid package name, may only contain alphanumeric characters"
- redirect_to :action => :new
+ redirect_to :action => :error
end
end
if params[:project]
unless params[:project] =~ /^\w[-\w]*$/
flash[:error] = "Invalid project name, may only contain alphanumeric characters"
- redirect_to :action => :new
+ redirect_to :action => :error
end
end
if params[:package]
unless params[:package] =~ /^\wi[-\w]*$/
flash[:error] = "Invalid package name, may only contain alphanumeric characters"
- redirect_to :action => :new
+ redirect_to :action => :error
end
end
diff --git a/src/webui/app/views/package/error.rhtml b/src/webui/app/views/package/error.rhtml
new file mode 100644
index 0000000..b7c857d
--- /dev/null
+++ b/src/webui/app/views/package/error.rhtml
@@ -0,0 +1 @@
+<h1>Parameter Error</h1>
--
1.7.7
--
To unsubscribe, e-mail: obs-commits+unsubscribe@opensuse.org
To contact the owner, e-mail: obs-commits+owner@opensuse.org