Skip to content
Snippets Groups Projects
Commit 9bbf02e8 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

Merge pull request #177 from splitbrain/FS#2111

FS#2111, improve security check
parents c70d6cee 25c4afb8
No related branches found
No related tags found
No related merge requests found
......@@ -1636,11 +1636,16 @@ function html_admin(){
}
// data security check
// @todo: could be checked and only displayed if $conf['savedir'] is under the web root
echo '<a style="border:none; float:right;"
href="http://www.dokuwiki.org/security#web_access_security">
<img src="data/security.png" alt="Your data directory seems to be protected properly."
onerror="this.parentNode.style.display=\'none\'" /></a>';
// simple check if the 'savedir' is relative and accessible when appended to DOKU_URL
// it verifies either:
// 'savedir' has been moved elsewhere, or
// has protection to prevent the webserver serving files from it
if (substr($conf['savedir'],0,2) == './'){
echo '<a style="border:none; float:right;"
href="http://www.dokuwiki.org/security#web_access_security">
<img src="'.DOKU_URL.$conf['savedir'].'/security.png" alt="Your data directory seems to be protected properly."
onerror="this.parentNode.style.display=\'none\'" /></a>';
}
print p_locale_xhtml('admin');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment