From 88363423f44e793e5263a66ace67fe60aff291c9 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Sun, 9 Dec 2012 23:46:12 +0100 Subject: [PATCH] Fix whitelist auth check for localhost --- lib/travis/api/app/endpoint/authorization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/travis/api/app/endpoint/authorization.rb b/lib/travis/api/app/endpoint/authorization.rb index 00b09dd1..35f95b01 100644 --- a/lib/travis/api/app/endpoint/authorization.rb +++ b/lib/travis/api/app/endpoint/authorization.rb @@ -256,7 +256,7 @@ class Travis::Api::App return unless uri = Addressable::URI.parse(target_origin) if uri.host =~ /\A(.+\.)?travis-ci\.(com|org)\Z/ uri.scheme == 'https' - elsif uri == 'localhost' or uri == '127.0.0.1' + elsif uri.host == 'localhost' or uri.host == '127.0.0.1' uri.port > 1023 end end