Merge pull request #24663 from nextcloud/sanitizers
Add sanitizers for JSON output
This commit is contained in:
commit
b2ef004969
|
@ -43,6 +43,7 @@ class OC_API {
|
|||
* respond to a call
|
||||
* @param \OC\OCS\Result $result
|
||||
* @param string $format the format xml|json
|
||||
* @psalm-taint-escape html
|
||||
*/
|
||||
public static function respond($result, $format = 'xml') {
|
||||
$request = \OC::$server->getRequest();
|
||||
|
|
|
@ -99,6 +99,7 @@ class OC_JSON {
|
|||
* Send json error msg
|
||||
* @deprecated Use a AppFramework JSONResponse instead
|
||||
* @suppress PhanDeprecatedFunction
|
||||
* @psalm-taint-escape html
|
||||
*/
|
||||
public static function error($data = []) {
|
||||
$data['status'] = 'error';
|
||||
|
@ -110,6 +111,7 @@ class OC_JSON {
|
|||
* Send json success msg
|
||||
* @deprecated Use a AppFramework JSONResponse instead
|
||||
* @suppress PhanDeprecatedFunction
|
||||
* @psalm-taint-escape html
|
||||
*/
|
||||
public static function success($data = []) {
|
||||
$data['status'] = 'success';
|
||||
|
|
Loading…
Reference in New Issue