From 8dc01d65d0aeb889a79c6bf730172d188afd6309 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Fri, 14 Mar 2025 17:31:58 +0200 Subject: [PATCH] Fixed issue with launch phase name --- cp/app/Controllers/ApplicationsController.php | 5 +++++ epp/src/epp-create.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/cp/app/Controllers/ApplicationsController.php b/cp/app/Controllers/ApplicationsController.php index f8970c5..d5a8c6d 100644 --- a/cp/app/Controllers/ApplicationsController.php +++ b/cp/app/Controllers/ApplicationsController.php @@ -74,6 +74,11 @@ class ApplicationsController extends Controller $authInfo = $data['authInfo'] ?? null; $invalid_domain = validate_label($domainName, $db); + if ($phaseType === 'custom' && empty($phaseName)) { + $this->container->get('flash')->addMessage('error', 'Please provide a phase name when selecting the "Custom" phase type.'); + return $response->withHeader('Location', '/application/create')->withStatus(302); + } + if ($invalid_domain) { $this->container->get('flash')->addMessage('error', 'Error creating application: Invalid domain name'); return $response->withHeader('Location', '/application/create')->withStatus(302); diff --git a/epp/src/epp-create.php b/epp/src/epp-create.php index 4715e86..9ae2099 100644 --- a/epp/src/epp-create.php +++ b/epp/src/epp-create.php @@ -634,6 +634,10 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m } elseif ($launch_phase === 'landrush') { // Continue } elseif ($launch_phase === 'custom') { + if (empty($launch_phase_name)) { + sendEppError($conn, $db, 2003, 'Missing required element: A phase name is mandatory for the custom phase.', $clTRID, $trans); + return; + } // Continue } else { // Mixed or unsupported form