From 4855a81d95fc1c0e582f923aa8775afa0d25fce5 Mon Sep 17 00:00:00 2001 From: Daniel Kinzler Date: Thu, 15 Feb 2007 01:24:33 +0000 Subject: [PATCH] Bug 8824: check read permission when exporting --- includes/SpecialExport.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/SpecialExport.php b/includes/SpecialExport.php index 27e81b45b9..610f627a7f 100644 --- a/includes/SpecialExport.php +++ b/includes/SpecialExport.php @@ -104,7 +104,13 @@ function wfSpecialExport( $page = '' ) { } } }*/ - $exporter->pageByName( $page ); + + #Bug 8824: Only export pages the user can read + $title = Title::newFromText( $page ); + if( is_null( $title ) ) continue; #TODO: perhaps output an tag or something. + if( !$title->userCan( 'read' ) ) continue; #TODO: perhaps output an tag or something. + + $exporter->pageByTitle( $title ); } $exporter->closeStream(); -- 2.20.1