diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-12-14 09:11:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 09:11:01 +0100 |
commit | b2ef004969c7f1e871e40dab2994552fb2d69b73 (patch) | |
tree | c141b9b11462a7bf3b2cd8a45e208d6cd5b00435 /lib | |
parent | 78ca1819f6ba4a828fe95465c98a4ee08a5987cc (diff) | |
parent | 8a8aa4f7dc72a6eb3f704806cf795c2bb7297b89 (diff) | |
download | nextcloud-server-b2ef004969c7f1e871e40dab2994552fb2d69b73.tar.gz nextcloud-server-b2ef004969c7f1e871e40dab2994552fb2d69b73.zip |
Merge pull request #24663 from nextcloud/sanitizers
Add sanitizers for JSON output
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_API.php | 1 | ||||
-rw-r--r-- | lib/private/legacy/OC_JSON.php | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_API.php b/lib/private/legacy/OC_API.php index 5e4a46ab4d7..cba60826196 100644 --- a/lib/private/legacy/OC_API.php +++ b/lib/private/legacy/OC_API.php @@ -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(); diff --git a/lib/private/legacy/OC_JSON.php b/lib/private/legacy/OC_JSON.php index a0b9868a023..1597955135e 100644 --- a/lib/private/legacy/OC_JSON.php +++ b/lib/private/legacy/OC_JSON.php @@ -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'; |