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
Return 400 on invalid CSP reports
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiCSPReport.php
diff --git
a/includes/api/ApiCSPReport.php
b/includes/api/ApiCSPReport.php
index
4139019
..
3a78c13
100644
(file)
--- a/
includes/api/ApiCSPReport.php
+++ b/
includes/api/ApiCSPReport.php
@@
-186,9
+186,9
@@
class ApiCSPReport extends ApiBase {
'method' => $method,
'user-agent' => $this->getRequest()->getHeader( 'user-agent' )
] );
'method' => $method,
'user-agent' => $this->getRequest()->getHeader( 'user-agent' )
] );
- //
500 so it shows up in browser's developer
console.
+ //
Return 400 on error for user agents to display, e.g. to the
console.
$this->dieWithError(
$this->dieWithError(
- [ 'apierror-csp-report', wfEscapeWikiText( $code ) ], 'cspreport-' . $code, [],
5
00
+ [ 'apierror-csp-report', wfEscapeWikiText( $code ) ], 'cspreport-' . $code, [],
4
00
);
}
);
}