BigW Consortium Gitlab

continue_params.rb 392 Bytes
Newer Older
1
module ContinueParams
2 3 4 5 6 7
  extend ActiveSupport::Concern

  def continue_params
    continue_params = params[:continue]
    return nil unless continue_params

8
    continue_params = continue_params.permit(:to, :notice, :notice_now)
9
    return unless continue_params[:to] && continue_params[:to].start_with?('/')
10
    return if continue_params[:to].start_with?('//')
11 12 13 14

    continue_params
  end
end