r54462 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54461‎ | r54462 | r54463 >
Date:17:27, 5 August 2009
Author:nimishg
Status:resolved (Comments)
Tags:
Comment:
Fixes bug 19686 -- changed draft_token to varbinary instead of int to avoid hash collisions
Modified paths:
  • /trunk/extensions/Drafts/Drafts.classes.php (modified) (history)
  • /trunk/extensions/Drafts/Drafts.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/Drafts/Drafts.sql
@@ -7,7 +7,7 @@
88 -- Unique ID for drafts
99 draft_id INTEGER AUTO_INCREMENT,
1010 -- Unique value generated at edit time to prevent duplicate submissions
11 - draft_token INTEGER,
 11+ draft_token VARBINARY(255),
1212 -- User who made the draft, 0 for anons
1313 draft_user INTEGER NOT NULL default 0,
1414 -- Page ID, 0 for proposed new pages
Index: trunk/extensions/Drafts/Drafts.classes.php
@@ -651,7 +651,7 @@
652652 $dbw->begin();
653653 // Builds insert/update information
654654 $data = array(
655 - 'draft_token' => (int) $this->getToken(),
 655+ 'draft_token' => (string) $this->getToken(),
656656 'draft_user' => (int) $wgUser->getID(),
657657 'draft_namespace' => (int) $this->title->getNamespace(),
658658 'draft_title' => (string) $this->title->getDBkey(),

Follow-up revisions

RevisionCommit summaryAuthorDate
r54759Created database patch (for users affected by bug 19686)nimishg23:22, 10 August 2009
r55637Add patch file for r54462werdna18:20, 27 August 2009
r55638Didn't notice r54759, moving the existing patch to a more standard name (foll...werdna18:21, 27 August 2009

Comments

#Comment by 😂 (talk | contribs)   17:32, 5 August 2009

Needs patch to update current installs.

#Comment by Werdna (talk | contribs)   18:21, 27 August 2009

Resolved with r54759.

Status & tagging log