diff options
author | Andreas Gohr <andi@splitbrain.org> | 2010-09-09 15:58:33 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-09-09 15:58:33 +0200 |
commit | c95a5b7dd09aa1bd32e773cc1d582de72fb3e54c (patch) | |
tree | 79bfb2e869a3851139a2ce6e9b154a160ef9212d /lib | |
parent | c8b43921bbe0aa20ea79575a30dc3cd3c296c393 (diff) | |
download | rpg-c95a5b7dd09aa1bd32e773cc1d582de72fb3e54c.tar.gz rpg-c95a5b7dd09aa1bd32e773cc1d582de72fb3e54c.tar.bz2 |
use background image based data security check in admin
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scripts/script.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 84114923f..c79c9b683 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -538,34 +538,3 @@ addInitEvent(function(){ } }); -/** - * Check data directory security - * - * Tries to access data/_dummy from the client. - * In a proper setup this should fail, if it succeeds a warning is displayed. - * This is only done on the Admin screen - */ -addInitEvent(function(){ - var isadmin = $('admin__version'); - if(!isadmin) return; - - var ajax = new sack(DOKU_BASE + 'data/_dummy'); - ajax.AjaxFailedAlert = ''; - ajax.encodeURIString = false; - if(ajax.failed) return true; - ajax.method = 'GET'; - - ajax.onCompletion = function(){ - if(this.response && (this.response.substr(0,14) == 'data directory')){ - var msg = document.createElement('div'); - msg.className = 'error'; - msg.innerHTML = '<b>Important:</b> Your <code>data</code> directory is not properly '+ - 'secured. This is a serious security problem and should be fixed '+ - 'immeadiately.<br /> You can find more info on our '+ - '<a href="http://www.dokuwiki.org/security#web_access_security">security page</a>.'; - var container = $('admin__version').parentNode; - container.insertBefore(msg,container.childNodes[0]); - } - }; - ajax.runAJAX(); -}); |