From 720cbef577f8696d44aa8d8ebaa712606ee6b433 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 18 Oct 2012 23:49:15 +0200 Subject: [PATCH] allow underscore and dash in subdomains --- lib/travis/api/app/endpoint/authorization.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/travis/api/app/endpoint/authorization.rb b/lib/travis/api/app/endpoint/authorization.rb index e5c7d8aa..bd2919f3 100644 --- a/lib/travis/api/app/endpoint/authorization.rb +++ b/lib/travis/api/app/endpoint/authorization.rb @@ -223,8 +223,8 @@ class Travis::Api::App def target_ok?(target_origin) target_origin =~ %r{ - ^ http:// (localhost|127\.0\.0\.1)(:\d+)? $ | - ^ https:// (\w+\.)?travis-ci\.(org|com) $ + ^ http:// (localhost|127\.0\.0\.1)(:\d+)? $ | + ^ https:// ([\w-_]+\.)?travis-ci\.(org|com) $ }x end end