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
path: root/app
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-07-22 18:38:08 +0300
committerGitLab Release Tools Bot <delivery-team+release-tools@gitlab.com>2019-07-30 18:25:27 +0300
commit1d4f9b79bead0f2b4947b0a99993f9409e665811 (patch)
tree1bbd01ddeba34b5c9be299bf30ef1514b5c183fe /app
parentf8eb16d8ee92527eef76a3a114197dd4417e532a (diff)
Merge branch '64870-can-t-save-pages-domain-form-with-let-s-encrypt-enabled-if-current-certificate-is-outdated' into 'master'
Resolve "Can't save pages domain form with Let's Encrypt enabled if current certificate is outdated" Closes #64870 See merge request gitlab-org/gitlab-ce!30995 (cherry picked from commit 8073b0554fc8f7dddc250025aaf5cedd09f423cb) 9c0f4286 Validate certificate chain only if it's changed
Diffstat (limited to 'app')
-rw-r--r--app/models/pages_domain.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb
index e6e491634ab..27c122d3559 100644
--- a/app/models/pages_domain.rb
+++ b/app/models/pages_domain.rb
@@ -22,7 +22,7 @@ class PagesDomain < ApplicationRecord
validate :validate_pages_domain
validate :validate_matching_key, if: ->(domain) { domain.certificate.present? || domain.key.present? }
- validate :validate_intermediates, if: ->(domain) { domain.certificate.present? }
+ validate :validate_intermediates, if: ->(domain) { domain.certificate.present? && domain.certificate_changed? }
attr_encrypted :key,
mode: :per_attribute_iv_and_salt,