Commit 66ce00bc authored by Tiago's avatar Tiago
Browse files

changed test of ssrf filter exception to remove mention of public/private (allow/deny preferred)

parent 58aa9cd1
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ module HTTPX
            SsrfFilter.unsafe_ip_address?(ipaddr) || @options.extra_unsafe_ranges&.any? { |r| r.include?(ipaddr) }
          end

          raise ServerSideRequestForgeryError, "#{@origin.host} has no public IP addresses" if addrs.empty?
          raise ServerSideRequestForgeryError, "#{@origin.host} has no allowed IP addresses" if addrs.empty?

          super
        end
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ module Requests
        start_test_servlet(dns_spoof_resolver) do |spoof_dns|
          HTTPX.plugin(SessionWithPool).plugin(:ssrf_filter).wrap do |session|
            response = session.get("https://wqwereasdsada.xyz", resolver_options: { nameserver: [spoof_dns.nameserver], cache: false })
            verify_error_response(response, "wqwereasdsada.xyz has no public IP addresses")
            verify_error_response(response, "wqwereasdsada.xyz has no allowed IP addresses")
          end
        end
      end unless RUBY_ENGINE == "jruby"