jenkins-bot has submitted this change and it was merged.
Change subject: Block non-JSON API access to VisualEditor, as it won't work
......................................................................
Block non-JSON API access to VisualEditor, as it won't work
Bug: 61017
Change-Id: I1d8f4509fc012bf5da91d2fd431651e55291edfa
---
M ApiVisualEditor.php
1 file changed, 11 insertions(+), 1 deletion(-)
Approvals:
Krinkle: Looks good to me, approved
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index a40fb40..ff51dcb 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -304,6 +304,7 @@
$user = $this->getUser();
$params = $this->extractRequestParams();
+
$page = Title::newFromText( $params['page'] );
if ( !$page ) {
$this->dieUsageMsg( 'invalidtitle', $params['page'] );
@@ -491,10 +492,19 @@
'page' => array(
ApiBase::PARAM_REQUIRED => true,
),
+ 'format' => array(
+ ApiBase::PARAM_DFLT => 'json',
+ ApiBase::PARAM_TYPE => array( 'json', 'jsonfm'
),
+ ),
'paction' => array(
ApiBase::PARAM_REQUIRED => true,
ApiBase::PARAM_TYPE => array(
- 'parse', 'parsefragment',
'serializeforcache', 'serialize', 'diff', 'getlanglinks',
+ 'parse',
+ 'parsefragment',
+ 'serialize',
+ 'serializeforcache',
+ 'diff',
+ 'getlanglinks',
),
),
'wikitext' => null,
--
To view, visit https://gerrit.wikimedia.org/r/119912
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d8f4509fc012bf5da91d2fd431651e55291edfa
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits