BUG: CMD_API_DNS_CONTROL & NS records

JBtje

New member
Joined
May 9, 2010
Messages
2
CMD_API_DNS_CONTROL & NS records

Hello,

I'm currently creating one big class to handle all kind of Direct admin commands via API.

I noticed that once I create a DNS record with "CMD_API_DNS_CONTROL" the NS records are not created correctly:

The next header I send to the above page:
domain=domain.com&action=add&type=NS&name=zzzz&value=192.168.1.1

with the following record as result:
name type value
192.168.1.1 NS zzzz

If you look close, you see that the value and the name are swaped around!

On the server version 1.35.1 is running (the laters one)


I hope this bug can be fixed soon, since i think its just a matter of swapping those 2 strings back to the correct order.

Best regards,
Jeffrey
 
Last edited:
Hello,

The backwards NS form is normal. If you check the html forms in your browser, you'll see the same thing.

The reason for this is our contain class needs a unique index, and because the domain will always be the same value, it cannot be the index, so we just swapped the value to be the index, aka "name".

It's not a bug, but rather a design decision. It's been that way since the beginning.

John
 
Hello John,

Thank you very much for this explanation. Now I've checked the source of DA, I see the value and the name have been swapped there too :)

Stupid of me to not check that...

Thank you very much!
Jeffrey
 
Back
Top