FS#1878: Hide Dokuwiki version information from metadata and only show it to admins and manager in do=check. Also protected meta files README, VERSION and COPYING additionally to .ht*

This commit is contained in:
Gina Haeussge 2010-06-26 18:25:41 +02:00
parent b150cd2c5c
commit 3f803e5e8d
3 changed files with 6 additions and 4 deletions

View File

@ -4,8 +4,8 @@
## global config. Symlinks maybe needed for URL rewriting.
#Options -Indexes -MultiViews +FollowSymLinks
## make sure nobody gets the htaccess files
<Files ~ "^[\._]ht">
## make sure nobody gets the htaccess, README, COPYING or VERSION files
<Files ~ "^([\._]ht|README$|VERSION$|COPYING$)">
Order allow,deny
Deny from all
Satisfy All

View File

@ -100,7 +100,9 @@ function check(){
global $conf;
global $INFO;
msg('DokuWiki version: '.getVersion(),1);
if ($INFO['isadmin'] || $INFO['ismanager']){
msg('DokuWiki version: '.getVersion(),1);
}
if(version_compare(phpversion(),'5.1.2','<')){
msg('Your PHP version is too old ('.phpversion().' vs. 5.1.2+ needed)',-1);

View File

@ -255,7 +255,7 @@ function tpl_metaheaders($alt=true){
}
// the usual stuff
$head['meta'][] = array( 'name'=>'generator', 'content'=>'DokuWiki '.getVersion() );
$head['meta'][] = array( 'name'=>'generator', 'content'=>'DokuWiki');
$head['link'][] = array( 'rel'=>'search', 'type'=>'application/opensearchdescription+xml',
'href'=>DOKU_BASE.'lib/exe/opensearch.php', 'title'=>$conf['title'] );
$head['link'][] = array( 'rel'=>'start', 'href'=>DOKU_BASE );