* Filemanager/Sharing: fix lost session on first load in sharing links with Firefox

This commit is contained in:
Ralf Becker 2020-03-17 20:38:14 +01:00
parent 83fd11f7c7
commit 04b83d4344

View File

@ -15,12 +15,18 @@ use EGroupware\Api;
$GLOBALS['egw_info'] = array('flags' => array(
'disable_Template_class' => True,
'login' => True,
'currentapp' => 'login',
'noheader' => True,
// misuse session creation callback to send the image, in case we have no session
'autocreate_session_callback' => 'send_image',
'currentapp' => 'api',
));
require('../header.inc.php');
send_image();
function send_image()
{
$path = $GLOBALS['egw_info']['server']['files_dir'] . '/anon-images';
if (!file_exists($path) || empty($_GET['src']) ||
@ -42,3 +48,5 @@ else
fpassthru($fp);
fclose($fp);
}
exit;
}