[bug] dot to underscore in API when fetching forwarders

MortyDot

Verified User
Joined
Mar 13, 2007
Messages
25
We've developed a plugin for WordPress to connect with DA for managing e-mail addresses and forwarders. During testing, we found a bug in the API of DA.

Description of the bug:
dots in forwarder address are translated to underscores, when requesting the list of forwarders using the API.


Replicating the bug:

Add a forwarder with a dot in the name. Now execute the following code to replicate the bug:
PHP:
    public function fetch($domain = null){
        //get the domain using the class that we wrote
        $domain = $this->getDomain($domain);

        //do a request on the socket, supplied by DirectAdmin
        $this->sock->query('/CMD_API_EMAIL_FORWARDERS', array(
            'action' => 'list',
            'domain' => $domain
        ));
        
        //get the response to the request
        $rows = $this->sock->fetch_parsed_body();
        
        //var dump the request
        var_dump($rows);
        return $rows;
    }
 
Back
Top