This file is indexed.

/usr/share/php/Horde/Itip.php is in php-horde-itip 2.0.5-1.

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
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?php
/**
 * Handles iTip invitation requests/responses.
 *
 * PHP version 5
 *
 * @category Horde
 * @package  Itip
 * @author   Gunnar Wrobel <wrobel@pardus.de>
 * @license  http://www.horde.org/licenses/lgpl21 LGPL
 * @link     http://pear.horde.org/index.php?package=Itip
 */

/**
 * Handles iTip invitation requests/responses.
 *
 * Copyright 2010 Klarälvdalens Datakonsult AB
 *
 * See the enclosed file COPYING for license information (LGPL). If you did not
 * receive this file, see
 * {@link http://www.horde.org/licenses/lgpl21 LGPL}.
 *
 * @category Horde
 * @package  Itip
 * @author   Gunnar Wrobel <wrobel@pardus.de>
 * @license  http://www.horde.org/licenses/lgpl21 LGPL
 * @link     http://pear.horde.org/index.php?package=Itip
 */
class Horde_Itip
{
    /**
     * The iTip response.
     *
     * @var Horde_Itip_Response
     */
    private $_response;

    /**
     * Constructor.
     *
     * @param Horde_Itip_Response $response The iTip response.
     */
    public function __construct(Horde_Itip_Response $response)
    {
        $this->_response = $response;
    }

    /**
     * Return the response as an iCalendar vEvent object.
     *
     * @param Horde_Itip_Response_Type $type The response type.
     *
     * @return Horde_Icalendar_Vevent The response object.
     */
    public function getVeventResponse(
        Horde_Itip_Response_Type $type
    )
    {
        return $this->_response->getVevent(
            $type, false
        );
    }

    /**
     * Return the response as an iCalendar object.
     *
     * @param Horde_Itip_Response_Type $type       The response type.
     * @param string                   $product_id The ID that should be set as
     *                                             the iCalendar product id.
     *
     * @return Horde_Icalendar The response object.
     */
    public function getIcalendarResponse(
        Horde_Itip_Response_Type $type,
        $product_id
    )
    {
        return $this->_response->getIcalendar(
            $type, $product_id
        );
    }

    /**
     * Send the response as a single part MIME message.
     *
     * @param Horde_Itip_Response_Type    $type      The response type.
     * @param Horde_Itip_Response_Options $options   The options for the response.
     * @param Horde_Mail_Transport        $transport The mail transport.
     *
     * @return array A list of two object: The mime headers and the mime
     *               message.
     * @throws Horde_Itip_Exception
     */
    public function sendSinglepartResponse(
        Horde_Itip_Response_Type $type,
        Horde_Itip_Response_Options $options,
        Horde_Mail_Transport $transport
    )
    {
        list($headers, $body) = $this->_response->getMessage(
            $type, $options
        );
        try {
            $body->send(
                $this->_response->getRequest()->getOrganizer(),
                $headers,
                $transport
            );
        } catch (Horde_Mime_Exception $e) {
            throw new Horde_Itip_Exception($e);
        }
    }

    /**
     * Send the invitation response as a multi part MIME message.
     *
     * @param Horde_Itip_Response_Type    $type      The response type.
     * @param Horde_Itip_Response_Options $options   The options for the response.
     * @param Horde_Mail_Transport        $transport The mail transport.
     *
     * @return NULL
     * @throws Horde_Itip_Exception
     */
    public function sendMultipartResponse(
        Horde_Itip_Response_Type $type,
        Horde_Itip_Response_Options $options,
        Horde_Mail_Transport $transport
    )
    {
        list($headers, $body) = $this->_response->getMultiPartMessage(
            $type, $options
        );
        try {
            $body->send(
                $this->_response->getRequest()->getOrganizer(),
                $headers,
                $transport
            );
        } catch (Horde_Mime_Exception $e) {
            throw new Horde_Itip_Exception($e);
        }
    }

    /**
     * Factory for generating a response object for an iCalendar invitation.
     *
     * @param Horde_Icalendar_Vevent $vevent   The iCalendar request.
     * @param Horde_Itip_Resource    $resource The invited resource.
     *
     * @return Horde_Itip_Response The prepared response.
     */
    static public function prepareResponse(
        Horde_Icalendar_Vevent $vevent,
        Horde_Itip_Resource $resource
    )
    {
        return new Horde_Itip_Response(
            new Horde_Itip_Event_Vevent(
                $vevent
            ),
            $resource
        );
    }

    /**
     * Factory for generating an iTip handler for an iCalendar invitation.
     *
     * @param Horde_Icalendar_Vevent $vevent   The iCalendar request.
     * @param Horde_Itip_Resource    $resource The invited resource.
     *
     * @return Horde_Itip The iTip handler.
     */
    static public function factory(
        Horde_Icalendar_Vevent $vevent,
        Horde_Itip_Resource $resource
    )
    {
        return new Horde_Itip(
            self::prepareResponse($vevent, $resource)
        );
    }
}