fix for fast cgi

This commit is contained in:
Roland Gruber 2013-06-03 15:44:29 +00:00
parent a778162d5b
commit b7fc23ef3d
1 changed files with 3 additions and 2 deletions

View File

@ -40,18 +40,19 @@ $app['direct_scripts'] = array('cmd.php','index.php',
# Which script was invoked. # Which script was invoked.
$app['script_running'] = $_SERVER['SCRIPT_NAME']; $app['script_running'] = $_SERVER['SCRIPT_NAME'];
$app['script_request_uri'] = $_SERVER['REQUEST_URI'];
foreach ($app['direct_scripts'] as $script) { foreach ($app['direct_scripts'] as $script) {
$app['scriptOK'] = false; $app['scriptOK'] = false;
if (preg_match('/'.$script.'$/',$app['script_running'])) { if (preg_match('/'.$script.'$/',$app['script_running']) || preg_match('/[^\\?]*'.$script.'/',$app['script_request_uri'])) {
$app['scriptOK'] = true; $app['scriptOK'] = true;
break; break;
} }
} }
# Anything in the tools dir or cron dir can be executed directly. # Anything in the tools dir or cron dir can be executed directly.
if ((! $app['scriptOK'] && preg_match('/^\/[cron|tools]/',$app['script_running'])) || ! isset($_SERVER['SERVER_SOFTWARE'])) if ((! $app['scriptOK'] && (preg_match('/^\/[cron|tools]/',$app['script_running']) || preg_match('/^\/[cron|tools]/',$app['script_request_uri']))) || ! isset($_SERVER['SERVER_SOFTWARE']))
$app['scriptOK'] = true; $app['scriptOK'] = true;
if (! $app['scriptOK']) { if (! $app['scriptOK']) {