Dennis1993
2013-07-26 4bf322d256d0460a2df5c03b1e173f6ccd9a6eb3
program/lib/Roundcube/rcube_utils.php
@@ -360,12 +360,8 @@
            return $value;
        }
        // strip single quotes if magic_quotes_sybase is enabled
        if (ini_get('magic_quotes_sybase')) {
            $value = str_replace("''", "'", $value);
        }
        // strip slashes if magic_quotes enabled
        else if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
        if (get_magic_quotes_gpc() || get_magic_quotes_runtime()) {
            $value = stripslashes($value);
        }
@@ -670,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