When using curl to test connectivity to web and ldap servers, you may get the following error message when using the curl command:
curl: (3) URL rejected: Malformed input to a URL function
You will need to use "percent encoding" in the URL to encode the special character.
https://www.w3schools.com/tags/ref_urlencode.ASP
For example, when testing an LDAP URL using curl, the below command will work in previous versions of curl:
curl -v "ldap://[ip address]:389/OU=Active Service Accounts,OU=Service Accounts,OU=Corporate Office,DC=mycompany,DC=com" -u "CN=ldapsmon,OU=Active Service Accounts,OU=Service Accounts,OU=Corporate Office,DC=mycompany,DC=com":"PASSWORD"
However this will fail in the newer versions with the error "URL rejected: Malformed input to a URL function". You will need to replace the space with "%20" like below:
curl -v ldap://[ip address]:389/OU=Active%20Service%20Accounts,OU=Service%20Accounts,OU=Corporate%20Office,DC=mycompany,DC=com -u "CN=ldapsmon,OU=Active Service Accounts,OU=Service Accounts,OU=Corporate Office,DC=mycompany,DC=com":"PASSWORD"