EPP validation improvements

This commit is contained in:
Pinga 2025-05-02 11:57:22 +03:00
parent 723d3c8906
commit 913cf7f79b
2 changed files with 31 additions and 7 deletions

View file

@ -173,7 +173,7 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
if ($postalInfoIntOrg) {
if (
preg_match('/(^\-)|(^\,)|(^\.)|(\-\-)|(\,\,)|(\.\.)|(\-$)/', $postalInfoIntOrg) ||
!preg_match('/^[a-zA-Z0-9\-\&\,\.\/\s]{5,}$/', $postalInfoIntOrg) ||
!preg_match('/^[a-zA-Z0-9\-\'\&\,\.\/\s]{5,}$/', $postalInfoIntOrg) ||
strlen($postalInfoIntOrg) > 255
) {
sendEppError($conn, $db, 2005, 'Invalid contact:org', $clTRID, $trans);