From d30fbc0900adc6fec032d34291220e9748da9e74 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 9 Aug 2023 09:39:36 +0200 Subject: [PATCH] Fix blocking subdomains of an already-blocked domain (#26392) --- app/controllers/admin/domain_blocks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/domain_blocks_controller.rb b/app/controllers/admin/domain_blocks_controller.rb index 16defc1ea..d1a9ea601 100644 --- a/app/controllers/admin/domain_blocks_controller.rb +++ b/app/controllers/admin/domain_blocks_controller.rb @@ -25,7 +25,7 @@ module Admin @domain_block.errors.delete(:domain) render :new else - if existing_domain_block.present? + if existing_domain_block.present? && existing_domain_block.domain == TagManager.instance.normalize_domain(@domain_block.domain.strip) @domain_block = existing_domain_block @domain_block.update(resource_params) end