metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 159 forks source link

Another two errors for the noridEppContact class #134

Closed sfenne closed 6 years ago

sfenne commented 6 years ago

Hi guys,

Have another issue regarding the noridEppContact class.

  1. Password seems to always get set in the extension class eppContact. Norid requires an empty AuthInfo/pw set

eppContact.php:78 should be removed eppContact.php:184 should be $this->password = $password;

This way, you can pass password to the constructor with either null or '' where the latter is required by Norid.

  1. Id seems to always get set in the extension class eppContact. Norid requires this field to be set to auto.

The noridEppContact constructor should override the ID by adding $this->setId('auto');

Confirmed OK for both creating and updating contacts.

metaregistrar commented 6 years ago

Hi Stephen,

I cannot change the eppContact class because something does not work with norid. It will affect too many other classes that are dependent on this class.

Anyway, the class is written so that if $password is null, no password field will be set in EPP. It worked for the guys who created the norid extension, so it should work for you too. In eppCreateContactRequest line 115 you can see that if $contact->password is null, no password element is added to the EPP request.

the htmlspecialchars in line 184 is because some passwords contain special chars like &, this will use the correct characters to send to the registries - we have already tested and confirmed this with various registries.

For the contact ID, can you propose a change (or create a pull request)? Because we do not have a norid connection, i cannot test any change that i would make.

sfenne commented 6 years ago

Hi and thanks for answering. I'll create a pull request this weekend.

Edit: PR #135

sfenne commented 6 years ago

Hey guys! Any update on my PR?

Thanks

metaregistrar commented 6 years ago

The PR has been merged now.