Merge "RawAction: Add json to the allowed content types"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 Oct 2017 10:06:51 +0000 (10:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Oct 2017 10:06:52 +0000 (10:06 +0000)
includes/actions/RawAction.php

index d8c8bc3..be10ae4 100644 (file)
@@ -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';
                }