Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2016-12-20 14:24:44 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-02-01 05:46:07 +0300
commit6ba149279445bd376e145dab2d7fa58808031692 (patch)
tree2ffc61951ad484100662682fe381c3387ec6dfa5
parent7163da6046c2b57f9e9cf3b83959a57763e2f460 (diff)
Update validates_hostname to 1.0.6 to fix a bug in parsing hexadecimal-looking domain names
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--spec/models/pages_domain_spec.rb8
3 files changed, 10 insertions, 4 deletions
diff --git a/Gemfile b/Gemfile
index bc1b13c7331..49851aabe19 100644
--- a/Gemfile
+++ b/Gemfile
@@ -49,7 +49,7 @@ gem 'attr_encrypted', '~> 3.0.0'
gem 'u2f', '~> 0.2.1'
# GitLab Pages
-gem 'validates_hostname', '~> 1.0.0'
+gem 'validates_hostname', '~> 1.0.6'
# Browser detection
gem 'browser', '~> 2.2'
diff --git a/Gemfile.lock b/Gemfile.lock
index 6263b02b041..5736862e5ab 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -799,7 +799,7 @@ GEM
get_process_mem (~> 0)
unicorn (>= 4, < 6)
uniform_notifier (1.10.0)
- validates_hostname (1.0.5)
+ validates_hostname (1.0.6)
activerecord (>= 3.0)
activesupport (>= 3.0)
version_sorter (2.1.0)
@@ -1017,7 +1017,7 @@ DEPENDENCIES
unf (~> 0.1.4)
unicorn (~> 5.1.0)
unicorn-worker-killer (~> 0.4.4)
- validates_hostname (~> 1.0.0)
+ validates_hostname (~> 1.0.6)
version_sorter (~> 2.1.0)
virtus (~> 1.0.1)
vmstat (~> 2.3.0)
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb
index 0cbea5be106..e6a4583a8fb 100644
--- a/spec/models/pages_domain_spec.rb
+++ b/spec/models/pages_domain_spec.rb
@@ -4,7 +4,7 @@ describe PagesDomain, models: true do
describe 'associations' do
it { is_expected.to belong_to(:project) }
end
-
+
describe :validate_domain do
subject { build(:pages_domain, domain: domain) }
@@ -20,6 +20,12 @@ describe PagesDomain, models: true do
it { is_expected.to be_valid }
end
+ context 'valid hexadecimal-looking domain' do
+ let(:domain) { '0x12345.com'}
+
+ it { is_expected.to be_valid }
+ end
+
context 'no domain' do
let(:domain) { nil }