This file is indexed.

/usr/share/php/Horde/Controller/Request/Mock.php is in php-horde-controller 2.0.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
 * @category Horde
 * @package  Controller
 * @author   Gunnar Wrobel <wrobel@pardus.de>
 * @license  http://www.horde.org/licenses/bsd BSD
 */
class Horde_Controller_Request_Mock extends Horde_Controller_Request_Http
{
    /**
     * Request variables.
     *
     * @var array
     */
    protected $_vars;

    /**
     * Constructor.
     *
     * @param array $vars  The request variables.
     */
    public function __construct($vars = array())
    {
        $this->setVars($vars);
        $server = $this->getServerVars();
        if (!empty($server['REDIRECT_URL'])) {
            $this->setPath($server['REDIRECT_URL']);
        } else if (!empty($server['REQUEST_URI'])) {
            $this->setPath($server['REQUEST_URI']);
        }
    } 

    /**
     * Set the request variables GET, POST, COOKIE, SERVER, REQUEST etc.
     *
     * @param array $vars  The request variables.
     */
    public function setVars($vars)
    {
        foreach ($vars as $key => $sub) {
            $this->_vars[strtoupper($key)] = $sub;
        }
    }

    /**
     * Gets the request variables GET, POST, COOKIE, SERVER, REQUEST etc.
     *
     * @param string $name  The name of the superglobal whose vars to return
     */
    protected function getVars($name)
    {
        if (isset($this->_vars[$name])) {
            return $this->_vars[$name];
        }
    }

    public function getGetVars()
    {
        return $this->getVars('GET');
    }

    public function getFileVars()
    {
        return $this->getVars('FILES');
    }

    public function getServerVars()
    {
        return $this->getVars('SERVER');
    }

    public function getPostVars()
    {
        return $this->getVars('POST');
    }

    public function getCookieVars()
    {
        return $this->getVars('COOKIE');
    }

    public function getRequestVars()
    {
        return $this->getVars('REQUEST');
    }
}