This file is indexed.

/usr/share/php/Horde/Mime/Part/Upgrade/V1.php is in php-horde-mime 2.10.3-1ubuntu1.

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
<?php
/**
 * Copyright 2015-2017 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl21.
 *
 * @category  Horde
 * @copyright 2015-2017 Horde LLC
 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
 * @package   Mime
 */

/**
 * Upgrade V1 of MIME serialized data to V2.
 *
 * @author    Michael Slusarz <slusarz@horde.org>
 * @category  Horde
 * @copyright 2015-2017 Horde LLC
 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
 * @package   Mime
 * @since     2.8.0
 */
class Horde_Mime_Part_Upgrade_V1
{
    /**
     * Converted data.
     *
     * @var array
     */
    public $data = null;

    /**
     * Constructor.
     *
     * @param array $data  V1 data.
     */
    public function __construct($data)
    {
        // Version number
        array_shift($data);

        $d = array();

        $type = array_shift($data);
        $subtype = array_shift($data);

        $ct = Horde_Mime_Headers_ContentParam_ContentType::create();
        $d[4] = new Horde_Mime_Headers();
        $d[4]->addHeaderOb($ct);
        $ct->setContentParamValue($type . '/' . $subtype);

        $d[9] = array_shift($data);

        if ($lang = array_shift($data)) {
            $d[4]->addHeaderOb(
                new Horde_Mime_Headers_ContentLanguage('', $lang)
            );
        }

        if ($cd = array_shift($data)) {
            $hdr = new Horde_Mime_Headers_ContentDescription(null, '');
            $d[4]->addHeaderOb($hdr);
            $hdr->setValue($cd);
        }

        $cd = new Horde_Mime_Headers_ContentParam_ContentDisposition(null, '');
        $d[4]->addHeaderOb($cd);
        $cd->setContentParamValue(array_shift($data));

        foreach (array_shift($data) as $key => $val) {
            $cd[$key] = $val;
        }

        foreach (array_shift($data) as $key => $val) {
            $ct[$key] = $val;
        }

        $d[7] = array_shift($data);
        $d[6] = array_shift($data);
        $d[2] = array_shift($data);
        $d[5] = array_shift($data);

        if ($boundary = array_shift($data)) {
            $ct['boundary'] = $boundary;
        }

        $d[1] = array_shift($data);

        if ($cid = array_shift($data)) {
            $hdr = new Horde_Mime_Headers_ContentId(null, $cid);
            $d[4]->addHeaderOb($hdr);
        }

        if ($cd = array_shift($data)) {
            $hdr = new Horde_Mime_Headers_Element_Single('Content-Duration', '');
            $d[4]->addHeaderOb($hdr);
            $hdr->setValue($cd);
        }

        $d[8] = 0;
        if (array_shift($data)) {
            $d[8] |= STATUS_REINDEX;
        }
        if (array_shift($data)) {
            $d[8] |= STATUS_BASEPART;
        }

        $d[3] = array_shift($data);

        if (count($data)) {
            $d[10] = reset($data);
        }

        $this->data = $d;
    }

}