diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-01-18 21:55:11 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-01-18 21:55:11 +0100 |
commit | 64807c842ccad35656e9abb857246a511d56d29a (patch) | |
tree | 64aa6cfae9492bc986f9100da7764fe94b302834 /inc/search.php | |
parent | 66212d97547e586a83979f0c75d539f1e3a8839c (diff) | |
download | rpg-64807c842ccad35656e9abb857246a511d56d29a.tar.gz rpg-64807c842ccad35656e9abb857246a511d56d29a.tar.bz2 |
skip invalid filenames in media directory list (related to FS#1312 FS#1306)
Invalid media files (like uppercase names) are no longer listed in the media
manager. Instead a warning is shown.
darcs-hash:20080118205511-7ad00-01625475e055be71628fd68aaaad786959420dce.gz
Diffstat (limited to 'inc/search.php')
-rw-r--r-- | inc/search.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inc/search.php b/inc/search.php index 584e684ff..b4d5f1274 100644 --- a/inc/search.php +++ b/inc/search.php @@ -205,6 +205,11 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){ $info = array(); $info['id'] = pathID($file,true); + if($info['id'] != cleanID($info['id'])){ + if($opts['showmsg']) + msg(hsc($info['id']).' is not a valid file name for DokuWiki - skipped',-1); + return false; // skip non-valid files + } //check ACL for namespace (we have no ACL for mediafiles) if(auth_quickaclcheck(getNS($info['id']).':*') < AUTH_READ){ |