expose_action :webshell do
shell_in_a_box_url_config = Rails.configuration.shell_in_a_box_url
+
return render_not_found if not shell_in_a_box_url_config
+ return unprocessable "Missing parameters" if not params['login'] or not params['hostname']
+
@webshell_login = params['login']
- @webshell_hostname = params['hostname']
+ @webshell_hostname = params['hostname'].chomp('.shell')
if not shell_in_a_box_url_config.end_with?('/')
shell_in_a_box_url_config += '/'