r67286 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67285‎ | r67286 | r67287 >
Date:17:35, 3 June 2010
Author:platonides
Status:resolved
Tags:
Comment:
Follow up r67282. This time using the right functions.
Thanks Nikerabbit.
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php
@@ -34,7 +34,7 @@
3535 'action' => $this->getTitle()->getLocalUrl(),
3636 'name' => 'uluser', 'id' => 'mw-codeauthor-form1' ) );
3737
38 - $form .= Html::hidden( 'linktoken', $wgUser->getToken() );
 38+ $form .= Html::hidden( 'linktoken', $wgUser->editToken('link') );
3939 $form .= Xml::openElement( 'fieldset' );
4040
4141 $additional = '';
@@ -62,7 +62,7 @@
6363 global $wgOut, $wgRequest, $wgUser;
6464 // Link an author to a wiki user
6565
66 - if ( $wgRequest->getVal( 'linktoken') != $wgUser->getToken() ) {
 66+ if ( $wgUser->matchEditToken( $wgRequest->getVal( 'linktoken'), 'link' ) {
6767 $wgOut->addWikiMsg( 'code-author-badtoken' );
6868 return;
6969 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r67391CodeReview: fixed syntax error from r67286maxsem07:07, 5 June 2010
r68656Fixed CodeReview borkage from r67286maxsem12:10, 28 June 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67282It would be pretty bad if a coder browser was abused to change all subversion...platonides16:48, 3 June 2010

Status & tagging log