From: Daniel Kinzler Date: Thu, 15 Feb 2007 01:24:33 +0000 (+0000) Subject: Bug 8824: check read permission when exporting X-Git-Tag: 1.31.0-rc.0~54046 X-Git-Url: http://git.cyclocoop.org/%27-%20%20.%20url_absolue%28find_in_path%28%27spip_style.css%27%29%29%20%20%20.%20url_absolue%28find_in_path%28%27prive/spip_style.css%27%29%29%20.%20%27?a=commitdiff_plain;h=4855a81d95fc1c0e582f923aa8775afa0d25fce5;p=lhc%2Fweb%2Fwiklou.git Bug 8824: check read permission when exporting --- 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();