mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Merge remote-tracking branch 'origin/support/2.7' into develop
# Conflicts: # application/itopwebpage.class.inc.php # core/config.class.inc.php # setup/setuputils.class.inc.php
This commit is contained in:
@@ -1097,6 +1097,11 @@ class ObjectController extends BrickController
|
||||
$aHeaders['Content-Type'] = $oDocument->GetMimeType();
|
||||
$aHeaders['Content-Disposition'] = (($sOperation === 'display') ? 'inline' : 'attachment').';filename="'.$oDocument->GetFileName().'"';
|
||||
|
||||
// N°4129 - Prevent XSS attacks & other script executions
|
||||
if (utils::GetConfig()->Get('security.disable_inline_documents_sandbox') === false) {
|
||||
$aHeaders['Content-Security-Policy'] = 'sandbox';
|
||||
}
|
||||
|
||||
return new Response($oDocument->GetData(), Response::HTTP_OK, $aHeaders);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user