dynamic output for APIs to use URL encoding

Version 1.531

Bugfix
Finished

The encoding of characters for API output in dynamic errors was previous html encoding, eg: - when it should have been: %2D for the example dash character, but applies to all encoding. This means all dynamic type output for API calls will have the encoding changed to the proper format. This bug was found while adding extra code to any CMD_API call where the two-factor auth or security questions were in play. The previous result would be the html form being sent to ask for the code or question. The new result for this case will look more like: error=1&text=Two%2DStep%20auth%20failure&details=two%2Dstep%20auth%20required%3A%20use%20a%20Login%20Key with http status: 401 Unauthorized this is useful for the Multi-Server Setup, for cases like a call to CMD_API_LOGIN_TEST (or any CMD_API call), where instead of getting a proper login error, it was getting the html page. This will also give you a clearer result/output when using the "Test Connection(s)" button on the Multi-Server Setup page.

Interested to try DirectAdmin? Get a 30-day Free Trial!