From: Rotem Liss Date: Sat, 9 Sep 2006 09:33:56 +0000 (+0000) Subject: * (bug 6886) PHP undefined offset on bad input to Special:Revisiondelete X-Git-Tag: 1.31.0-rc.0~55807 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=c45405c096525d0f94d34b7293be80f0d9ab940c;p=lhc%2Fweb%2Fwiklou.git * (bug 6886) PHP undefined offset on bad input to Special:Revisiondelete * (bug 6887) PHP error for call to getId() on bad input to Special:Revisiondelete * (bug 6888) PHP error for call to getTimestamp() on bad input to Special:Revisiondelete --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 03f41e9140..d78c081f7a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -186,6 +186,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Localized page numbers in drop-down for DjVu page selection * Fixed linktrail for vi * (bug 6893) "Call to a member function exists() on a non-object" on trackback.php with bad input +* (bug 6886) PHP undefined offset on bad input to Special:Revisiondelete +* (bug 6887) PHP error for call to getId() on bad input to Special:Revisiondelete +* (bug 6888) PHP error for call to getTimestamp() on bad input to Special:Revisiondelete == Languages updated == diff --git a/includes/SpecialRevisiondelete.php b/includes/SpecialRevisiondelete.php index 7fa8bbb4b5..93ea1c4505 100644 --- a/includes/SpecialRevisiondelete.php +++ b/includes/SpecialRevisiondelete.php @@ -13,7 +13,7 @@ function wfSpecialRevisiondelete( $par = null ) { global $wgOut, $wgRequest, $wgUser; $target = $wgRequest->getVal( 'target' ); - $oldid = $wgRequest->getInt( 'oldid' ); + $oldid = $wgRequest->getIntArray( 'oldid' ); $sk = $wgUser->getSkin(); $page = Title::newFromUrl( $target ); @@ -23,6 +23,11 @@ function wfSpecialRevisiondelete( $par = null ) { return; } + if( is_null( $oldid ) ) { + $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' ); + return; + } + $form = new RevisionDeleteForm( $wgRequest ); if( $wgRequest->wasPosted() ) { $form->submit( $wgRequest ); @@ -58,13 +63,15 @@ class RevisionDeleteForm { function show( $request ) { global $wgOut, $wgUser; - $first = $this->revisions[0]; - $wgOut->addWikiText( wfMsg( 'revdelete-selected', $this->page->getPrefixedText() ) ); $wgOut->addHtml( "