dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ApiCSPReport: Fix undefined $userAgent variable
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiCSPReport.php
diff --git
a/includes/api/ApiCSPReport.php
b/includes/api/ApiCSPReport.php
index
42d1093
..
82a7cce
100644
(file)
--- a/
includes/api/ApiCSPReport.php
+++ b/
includes/api/ApiCSPReport.php
@@
-47,7
+47,7
@@
class ApiCSPReport extends ApiBase {
$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, [
@@
-81,9
+81,10
@@
class ApiCSPReport extends ApiBase {
* 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
* @return array
*/
* @return array
*/
- 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' );
@@
-137,7
+138,7
@@
class ApiCSPReport extends ApiBase {
/**
* Get the report from post body and turn into associative array.
*
/**
* Get the report from post body and turn into associative array.
*
- * @return
A
rray
+ * @return
a
rray
*/
private function getReport() {
$postBody = $this->getRequest()->getRawInput();
*/
private function getReport() {
$postBody = $this->getRequest()->getRawInput();