Skip to content

Commit

Permalink
Adds failsafe: placing disabled file in abortlogin directory
Browse files Browse the repository at this point in the history
  • Loading branch information
turnermm committed Jul 5, 2020
1 parent d100b30 commit 6a4517e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.php
Expand Up @@ -21,11 +21,15 @@ function register(Doku_Event_Handler $controller)
function dw_start(&$event, $param)
{
global $ACT, $INPUT, $USERINFO;
$ip = $_SERVER['REMOTE_ADDR'];
if(!$this->getConf('enable_test')) {
return;
}
if(file_exists(DOKU_PLUGIN . 'abortlogin/disabled')) {
msg("Remove the disabled file from the plugin directory when you are finished setting up. Your current IP is $ip",2);
return;
}
if($ACT != 'login') return;
$ip = $_SERVER['REMOTE_ADDR'];

$u = $INPUT->str('u'); $p=$INPUT->str('p'); $action = $INPUT->post->str('do');
$test = $this->getConf('test');
Expand Down

0 comments on commit 6a4517e

Please sign in to comment.