debian-mirror-gitlab/app/controllers/concerns/continue_params.rb

15 lines
392 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
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?('/')
2017-08-17 22:00:37 +05:30
return if continue_params[:to].start_with?('//')
2016-06-02 11:05:42 +05:30
continue_params
end
end