Ladsgroup has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/384089 )
Change subject: Add json to the allowed content types
......................................................................
Add json to the allowed content types
This is the most horrible hack I've every written but it works
And I'm also trying to clean this up a little in other patches
Bug: T178060
Change-Id: Ia6d0c4b8c1062966da48e3bebf057c621b39ba87
---
M includes/actions/RawAction.php
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/89/384089/1
diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index d8c8bc3..b3c25c7 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -233,10 +233,18 @@
$ctype = 'text/javascript';
} elseif ( $gen == 'css' ) {
$ctype = 'text/css';
+ } elseif ( $gen == 'json' ) {
+ $ctype = 'application/json';
}
}
- $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';
}
--
To view, visit https://gerrit.wikimedia.org/r/384089
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6d0c4b8c1062966da48e3bebf057c621b39ba87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits