Bug: T194899
Change-Id: Ia83f961da1db2d1245859ae584db883b7a11081c
$this->verifyPostBodyOk();
$report = $this->getReport();
$this->verifyPostBodyOk();
$report = $this->getReport();
- $flags = $this->getFlags( $report );
+ $flags = $this->getFlags( $report, $userAgent );
$warningText = $this->generateLogLine( $flags, $report );
$this->logReport( $flags, $warningText, [
$warningText = $this->generateLogLine( $flags, $report );
$this->logReport( $flags, $warningText, [
* Get extra notes about the report.
*
* @param array $report The CSP report
* Get extra notes about the report.
*
* @param array $report The CSP report
+ * @param string $userAgent
- private function getFlags( $report ) {
+ private function getFlags( $report, $userAgent ) {
$reportOnly = $this->getParameter( 'reportonly' );
$source = $this->getParameter( 'source' );
$falsePositives = $this->getConfig()->get( 'CSPFalsePositiveUrls' );
$reportOnly = $this->getParameter( 'reportonly' );
$source = $this->getParameter( 'source' );
$falsePositives = $this->getConfig()->get( 'CSPFalsePositiveUrls' );
/**
* Get the report from post body and turn into associative array.
*
/**
* Get the report from post body and turn into associative array.
*
*/
private function getReport() {
$postBody = $this->getRequest()->getRawInput();
*/
private function getReport() {
$postBody = $this->getRequest()->getRawInput();