Skip to content

Commit 72bb53b

Browse files
author
Lennart Koopmann
committed
trim hostname in redirector
1 parent 95a5953 commit 72bb53b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/hosts_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def destroy
5252
end
5353

5454
def quickjump
55-
@host = Host.find_by_host params[:host]
55+
@host = Host.find_by_host params[:host].strip
5656

5757
if @host.blank?
5858
flash[:error] = "<strong>Unknown host</strong> <span>Could not find host</span>"
5959
redirect_to :action => "index"
6060
else
61-
redirect_to :action => "show", :id => Base64.encode64(params[:host])
61+
redirect_to :action => "show", :id => Base64.encode64(params[:host].strip)
6262
end
6363
end
6464
end

0 commit comments

Comments
 (0)