ContentSecurityPolicyReporter

class \TYPO3\CMS\Backend\Middleware\ContentSecurityPolicyReporter

Extends
AbstractContentSecurityPolicyReporter

Table of Contents

Constants

URI_KEYS  : mixed = ['document-uri', 'report-uri', 'blocked-uri', '...

Properties

$dispositionMapFactory  : DispositionMapFactory
$hashService  : HashService
$policyProvider  : PolicyProvider
$reportRepository  : ReportRepository

Methods

__construct()  : mixed
process()  : ResponseInterface
anonymizeDetails()  : array
anonymizeUri()  : string
generateReportSummary()  : string
getRequestQueryParam()  : string|null
isCspReport()  : bool
Determines, whether the request is eligible to be handled by the local reporting URI (`targetsCspReportUri()` must have been called before).
isJson()  : bool
persistCspReport()  : void
targetsCspReportUri()  : bool
Determines, whether current request URI starts with local reporting URI, (e.g. `https://ip12.anyhost.it:8443/en/@http-reporting?csp=report`).

Constants

URI_KEYS

protected mixed URI_KEYS = ['document-uri', 'report-uri', 'blocked-uri', 'referrer']

Properties

Methods

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface

Parameters

$request : ServerRequestInterface
$handler : RequestHandlerInterface

Return values

ResponseInterface

anonymizeDetails()

protected anonymizeDetails(array $details) : array

Parameters

$details : array

Return values

array

anonymizeUri()

protected anonymizeUri(string $value) : string

Parameters

$value : string

Return values

string

getRequestQueryParam()

protected getRequestQueryParam(ServerRequestInterface $request, string $name) : string|null

Parameters

$request : ServerRequestInterface
$name : string

Return values

string|null

isCspReport()

Determines, whether the request is eligible to be handled by the local reporting URI (`targetsCspReportUri()` must have been called before).

protected isCspReport(Scope $scope, ServerRequestInterface $request[, DispositionConfiguration|null $dispositionConfiguration = null ]) : bool

Parameters

$scope : Scope
$request : ServerRequestInterface
$dispositionConfiguration : DispositionConfiguration|null = null

Return values

bool

isJson()

protected isJson(string $value) : bool

Parameters

$value : string

Return values

bool

persistCspReport()

protected persistCspReport(Scope $scope, ServerRequestInterface $request) : void

Parameters

$scope : Scope
$request : ServerRequestInterface

targetsCspReportUri()

Determines, whether current request URI starts with local reporting URI, (e.g. `https://ip12.anyhost.it:8443/en/@http-reporting?csp=report`).

protected targetsCspReportUri(Scope $scope, ServerRequestInterface $request) : bool

Parameters

$scope : Scope
$request : ServerRequestInterface

Return values

bool
On this page