This file is indexed.

/usr/share/horde/ansel/lib/Ajax/Imple/EditFaces.php is in php-horde-ansel 3.0.5+debian0-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
<?php
/**
 * Imple for performing Ajax discovery and editing of image faces.
 *
 * Copyright 2008-2016 Horde LLC (http://www.horde.org/)
 *
 * @author  Duck <duck@obala.net>
 * @author  Michael J. Rubinsky <mrubinsk@horde.org>
 * @package Ansel
 */
class Ansel_Ajax_Imple_EditFaces extends Horde_Core_Ajax_Imple
{
    /**
     */
    protected function _attach($init)
    {
        if ($init) {
            $this->_jsOnDoAction(
                '$("faces_widget_content").update(' .
                     Horde_Serialize::serialize(_("Loading..."), Horde_Serialize::JSON) .
                 ')'
            );
            $this->_jsOnComplete(
                '$("faces_widget_content").update(e.memo)'
            );

            $GLOBALS['page_output']->addScriptFile('editfaces.js');
        }

        return array(
            'image_id' => $this->_params['image_id']
        );
    }

    /**
     */
    protected function _handle(Horde_Variables $vars)
    {
        global $injector, $prefs;

        $faces = $injector->getInstance('Ansel_Faces');
        $image_id = intval($vars->image_id);
        $results = $faces->getImageFacesData($image_id);

        // Attempt to get faces from the picture if we don't already have
        // results, or if we were asked to explicitly try again.
        if (empty($results)) {
            $image = $injector->getInstance('Ansel_Storage')->getImage($image_id);
            $image->createView('screen', null, ($prefs->getValue('watermark_auto') ?  $prefs->getValue('watermark_text', '') : ''));
            $results = $faces->getFromPicture($image_id, true);
        }

        if (empty($results)) {
            $results = new stdClass();
            $results->response = _("No faces found");
            return new Horde_Core_Ajax_Response($results);
        }

        $customurl = Horde::url('faces/custom.php');
        Horde::startBuffer();
        include ANSEL_TEMPLATES . '/faces/image.inc';
        $response = new stdClass();
        $response->response = Horde::endBuffer();

        return new Horde_Core_Ajax_Response($response);
    }

}