Thomas Bruederli
2013-07-17 4d480b36ea4b503ed997b1b9c60c433b5508e4aa
program/lib/Roundcube/rcube_utils.php
@@ -666,6 +666,21 @@
    /**
     * Returns the real remote IP address
     *
     * @return string Remote IP address
     */
    public static function remote_addr()
    {
        foreach (array('HTTP_X_FORWARDED_FOR','HTTP_X_REAL_IP','REMOTE_ADDR') as $prop) {
            if (!empty($_SERVER[$prop]))
                return $_SERVER[$prop];
        }
        return '';
    }
    /**
     * Read a specific HTTP request header.
     *
     * @param  string $name Header name