debian-mirror-gitlab/app/controllers/concerns/continue_params.rb
2017-08-17 22:00:37 +05:30

14 lines
392 B
Ruby

module ContinueParams
extend ActiveSupport::Concern
def continue_params
continue_params = params[:continue]
return nil unless continue_params
continue_params = continue_params.permit(:to, :notice, :notice_now)
return unless continue_params[:to] && continue_params[:to].start_with?('/')
return if continue_params[:to].start_with?('//')
continue_params
end
end