EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/156600
Change subject: Temporarily override token name prefixing
......................................................................
Temporarily override token name prefixing
Due to changes made in Ia28a8497 the api was failing while looking
for tokens due to it prefixing the token with the module prefix.
This temporarily overrides that until core can be adjusted.
Change-Id: I894397497b7072511a788326e652fe617160735c
---
M includes/api/ApiFlowBase.php
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/00/156600/1
diff --git a/includes/api/ApiFlowBase.php b/includes/api/ApiFlowBase.php
index aadc37f..266841b 100644
--- a/includes/api/ApiFlowBase.php
+++ b/includes/api/ApiFlowBase.php
@@ -151,6 +151,21 @@
}
}
+ /**
+ * Override prefix on CSRF token so the same code can be reused for
+ * all modules. This is a *TEMPORARY* hack please remove as soon as
+ * unprefixed tokens are working correctly again.
+ *
+ * @param string $paramName
+ * @return string
+ */
+ public function encodeParamName( $paramName ) {
+ return $paramName === 'token'
+ ? 'token'
+ : parent::encodeParamName( $paramName );
+ }
+
+
public function getHelpUrls() {
return array(
'https://www.mediawiki.org/wiki/Extension:Flow/API#' .
$this->getAction(),
--
To view, visit https://gerrit.wikimedia.org/r/156600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I894397497b7072511a788326e652fe617160735c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits