More RST updates

This commit is contained in:
Pinga 2025-05-13 19:09:20 +03:00
parent 53dc8c60c4
commit 91f5b7d824
3 changed files with 39 additions and 28 deletions

View file

@ -689,6 +689,14 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m
sendEppError($conn, $db, 2003, 'Invalid dates: acceptedDate must be before notAfter', $clTRID, $trans);
return;
}
$currentTime = new DateTime('now', new DateTimeZone('UTC'));
$interval = $currentTime->getTimestamp() - $acceptedDate->getTimestamp();
if ($interval > 172800) { // 172800 seconds = 48 hours
sendEppError($conn, $db, 2003, 'Invalid acceptedDate: must be within 48 hours of current time', $clTRID, $trans);
return;
}
} catch (Exception $e) {
sendEppError($conn, $db, 2003, 'Invalid date format', $clTRID, $trans);
return;
@ -696,6 +704,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m
if (!validateTcnId($domainName, $noticeid, $launch_notAfter)) {
sendEppError($conn, $db, 2306, 'Invalid TMCH claims noticeID format', $clTRID, $trans);
return;
}
} elseif ($launch_phase === 'landrush') {
// Continue