- # Check if the given IP is valid - otherwise check if it is a valid domain.
- if (! &General::validip($cgiparams{'REMOTE'})) {
+ # Check if a remote host/IP has been configured - the field can be empty on the server side.
+ if ($cgiparams{'REMOTE'} ne '') {
+ # Check if the given IP is valid - otherwise check if it is a valid domain.
+ if (! &General::validip($cgiparams{'REMOTE'})) {
+ # Check for a valid domain.
+ if (! &General::validfqdn ($cgiparams{'REMOTE'})) {
+ $errormessage = $Lang::tr{'invalid input for remote host/ip'};