From bf1de1633219100aeca9ed6298f392aa77080e39 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Mon, 21 Aug 2023 11:53:01 +0300 Subject: [PATCH] Small fixes --- README.md | 2 +- epp/EppWriter.php | 1 + epp/helpers.php | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 438b3de..ce181f8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ We're on a mission to make **Namingo** the best it can be, and we need your expe - **WHOIS and DAS Servers**: These servers are almost ready to go! They are functional but require additional testing and security hardening to ensure reliability and safety. -- **EPP Server**: Our work is ongoing here. Basic commands like domain/contact check and info are operational. However, it's in need of further testing, security measures, and the addition of more commands. +- **EPP Server**: Our EPP Server is progressing steadily. Currently, the Check, Create, Info, Poll, Delete, and Renew commands are fully operational. We're actively developing the Update and Transfer commands. Extensions like RGP, SecDNS, and others are also on our development roadmap. As always, we're committed to ensuring security and thorough testing as we continue to enhance our server capabilities. - **RDAP Server**: Nearing completion. The primary focus is on formatting more data for the output. Like the others, it also requires further testing and security hardening. diff --git a/epp/EppWriter.php b/epp/EppWriter.php index 3a27e4e..77b6484 100644 --- a/epp/EppWriter.php +++ b/epp/EppWriter.php @@ -31,6 +31,7 @@ class EppWriter { 'info_funds' => '_info_funds', 'update_host' => '_common', 'poll' => '_poll', + 'error' => '_common', 'unknown' => '_common', ]; diff --git a/epp/helpers.php b/epp/helpers.php index 9fd000a..1faf09c 100644 --- a/epp/helpers.php +++ b/epp/helpers.php @@ -24,7 +24,7 @@ function sendGreeting($conn) { 'urn:ietf:params:xml:ns:host-1.0' ], 'extensions' => [ - 'http://www.namingo.org/epp/nBalance-1.0', + 'https://namingo.org/epp/funds-1.0', 'http://www.namingo.org/epp/nIdent-1.0', 'urn:ietf:params:xml:ns:secDNS-1.1', 'urn:ietf:params:xml:ns:rgp-1.0', @@ -49,17 +49,17 @@ function sendGreeting($conn) { } function sendEppError($conn, $code, $msg) { - $errorResponse = << - - - - $msg - - - -XML; - sendEppResponse($conn, $errorResponse); + $response = [ + 'command' => 'error', + 'resultCode' => $code, + 'msg' => $msg, + 'clTRID' => '1', + 'svTRID' => generateSvTRID(), + ]; + + $epp = new EPP\EppWriter(); + $xml = $epp->epp_writer($response); + sendEppResponse($conn, $xml); } function sendEppResponse($conn, $response) {