This file is indexed.

/usr/share/horde/wicked/diff.php is in php-horde-wicked 2.0.7-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
<?php
/**
 * Copyright 2003-2016 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Chuck Hagenbuch <chuck@horde.org>
 */

require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('wicked');

$v1 = Horde_Util::getFormData('v1');
$v2 = Horde_Util::getFormData('v2');

/* Bail out if we didn't get any versions - at least one of these has
 * to be non-empty. */
if (!$v1 && !$v2) {
    Horde::url('history.php', true)
        ->add('page', Horde_Util::getFormData('page'))
        ->redirect();
}

/* Make sure that $v2 is a higher version than $v1. Empty string is
 * the current version of the page, so is always highest.  Also, '?' is a
 * wildcard for the previous version, so it's always the lowest. */
if (!$v1 || ($v2 && version_compare($v1, $v2) > 0) || $v2 == '?') {
    $tmp = $v1;
    $v1 = $v2;
    $v2 = $tmp;
}

try {
    $page = Wicked_Page::getPage(Horde_Util::getFormData('page'), $v2);
} catch (Wicked_Exception $e) {
    $notification->push(sprintf(_("Internal error viewing requested page: %s"), $e->getMessage()), 'horde.error');
    Wicked::url('Wiki/Home', true)->redirect();
}

if ($v1 == '?') {
    $v1 = $page->previousVersion();
}

/* Kick back to the display page if we're not allowed to diff this
 * page. */
if (!$page->allows(Wicked::MODE_DIFF)) {
    Wicked::url($page->pageName(), true)
        ->add('actionID', 'diff')
        ->redirect();
}

Wicked::setTopbar();
$page_output->header(array(
    'title' => sprintf(_("Diff for %s between %s and %s"), $page->pageName(), $v1, $page->version())
));
$notification->notify(array('listeners' => 'status'));
$page->render(Wicked::MODE_DIFF, $v1);
$page_output->footer();