From: Amir Sarabadani Date: Fri, 13 Oct 2017 18:37:18 +0000 (+0200) Subject: RawAction: Add json to the allowed content types X-Git-Tag: 1.31.0-rc.0~1670^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=31f53f98368fb66fbda66261b0e8248978d71586 RawAction: Add json to the allowed content types This is not the best way to handle json type but I'm trying to clean this up a little in other patches Bug: T178060 Change-Id: Ia6d0c4b8c1062966da48e3bebf057c621b39ba87 --- diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index d8c8bc3213..be10ae47d7 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -236,7 +236,13 @@ class RawAction extends FormlessAction { } } - $allowedCTypes = [ 'text/x-wiki', 'text/javascript', 'text/css', 'application/x-zope-edit' ]; + $allowedCTypes = [ + 'text/x-wiki', + 'text/javascript', + 'text/css', + 'application/x-zope-edit', + 'application/json' + ]; if ( $ctype == '' || !in_array( $ctype, $allowedCTypes ) ) { $ctype = 'text/x-wiki'; }