    public function getCookiePath()
    {
        static $cookie_path = null;

        if (null !== $cookie_path && !defined('TESTSUITE')) {
            return $cookie_path;
        }

        if (isset($GLOBALS['PMA_PHP_SELF'])) {
            $parsed_url = parse_url($GLOBALS['PMA_PHP_SELF']);
        } else {
            $parsed_url = parse_url(PMA_getenv('REQUEST_URI'));
        }

        $parts = explode(
            '/',
            rtrim(str_replace('\\', '/', $parsed_url['path']), '/')
        );

        /* Remove filename */
        if (substr($parts[count($parts) - 1], -4) == '.php') {
            $parts = array_slice($parts, 0, count($parts) - 1);
        }

        /* Remove extra path from javascript calls */
        if (defined('PMA_PATH_TO_BASEDIR')) {
            $parts = array_slice($parts, 0, count($parts) - 1);
        }

        $parts[] = '';

        return implode('/', $parts);
    }
Software security is not security software. Here we're concerned with topics like authentication, access control, confidentiality, cryptography, and privilege management.