method

_enforce_open_redirect_protection

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActionController::Redirecting
_enforce_open_redirect_protection(location, allow_other_host:) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/metal/redirecting.rb, line 195
      def _enforce_open_redirect_protection(location, allow_other_host))
        if allow_other_host || _url_host_allowed?(location)
          location
        else
          raise UnsafeRedirectError, "Unsafe redirect to #{location.truncate(100).inspect}, pass allow_other_host: true to redirect anyway."
        end
      end
Register or log in to add new notes.