/usr/share/horde/trean/favicon.php is in php-horde-trean 1.1.4-1build1.
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 | <?php
/**
* Copyright 2005-2016 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (BSD). If you did not
* did not receive this file, see http://www.horde.org/licenses/bsdl.php.
*
* @author Ben Chavet <ben@horde.org>
*/
require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('trean', array('session_control' => 'readonly'));
$bookmark_id = Horde_Util::getFormData('bookmark_id');
if (!$bookmark_id) {
exit;
}
try {
$bookmark = $trean_gateway->getBookmark($bookmark_id);
} catch (Horde_Exception $e) {
exit;
}
if (!$bookmark || !$bookmark->favicon_url) {
exit;
}
$favicon_hash = md5($bookmark->favicon_url);
// Initialize VFS
try {
$vfs = $GLOBALS['injector']
->getInstance('Horde_Core_Factory_Vfs')
->create();
if (!$vfs->exists('.horde/trean/favicons/', $favicon_hash)) {
exit;
}
} catch (Exception $e) {
}
$data = $vfs->read('.horde/trean/favicons/', $favicon_hash);
$browser->downloadHeaders('favicon', null, true, strlen($data));
header('Expires: ' . gmdate('r', time() + 172800));
header('Cache-Control: public, max-age=172800');
header('Pragma:');
echo $data;
|