From 31f53f98368fb66fbda66261b0e8248978d71586 Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Fri, 13 Oct 2017 20:37:18 +0200 Subject: [PATCH] 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 --- includes/actions/RawAction.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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'; } -- 2.20.1