From de8c6fd31624274b891092d1ded4b3bf6e818386 Mon Sep 17 00:00:00 2001 From: Pavlo Tkach <3469726+ptkach@users.noreply.github.com> Date: Wed, 25 Jan 2023 14:53:12 -0500 Subject: [PATCH] Add a condition update precaution to validateNewState (#1920) --- .../google/registry/flows/domain/DomainUpdateFlow.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java b/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java index 2d222a568..0d3b887bc 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainUpdateFlow.java @@ -307,6 +307,13 @@ public final class DomainUpdateFlow implements TransactionalFlow { } } + /** + * Checks whether the new state of the domain is valid. + * + *
Note: Before adding or amending conditions, existing data has to be verified for being + * compliant with the additions or amendments, otherwise existing data can become invalid and + * cause Domain update failure. + */ private void validateNewState(Domain newDomain) throws EppException { validateRequiredContactsPresent(newDomain.getRegistrant(), newDomain.getContacts()); validateDsData(newDomain.getDsData());