X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;ds=sidebyside;f=euc%2Fnucleus%2Findex.php;h=9ba1101465615142a8505bafcdf6f50880577253;hb=8199bd724260c4e979baa79e375b1cb272d26938;hp=98dad80c84c0e86101ad8fad693c0c4258e059cf;hpb=f384527c3a9d9a28938304ede1edfd4944e609d0;p=nucleus-jp%2Fnucleus-jp-ancient.git diff --git a/euc/nucleus/index.php b/euc/nucleus/index.php index 98dad80..9ba1101 100755 --- a/euc/nucleus/index.php +++ b/euc/nucleus/index.php @@ -1,73 +1,65 @@ - 'install.sql should be deleted', - '../install.php' => 'install.php should be deleted', - 'upgrades' => 'nucleus/upgrades directory should be deleted', - 'convert' => 'nucleus/convert directory should be deleted' - ); - $aFound = array(); - foreach($aFiles as $fileName => $fileDesc) - { - if (@file_exists($fileName)) - array_push($aFound, $fileDesc); - } - if (@is_writable('../config.php')) { - array_push($aFound, 'config.php should be non-writable (chmod to 444)'); - } - if (sizeof($aFound) > 0) - { - startUpError( - '

One or more of the Nucleus installation files are still present on the webserver, or are writable.

You should remove these files or change their permissions to ensure security. Here are the files that were found by Nucleus

If you don\'t want to see this error message again, without solving the problem, set $CONF[\'alertOnSecurityRisk\'] in globalfunctions.php to 0, or do this at the end of config.php.

', - 'Security Risk' - ); - } - } - - $bNeedsLogin = false; - $bIsActivation = in_array($action, array('activate', 'activatesetpwd')); - - if ($action == 'logout') - $bNeedsLogin = true; - - if (!$member->isLoggedIn() && !$bIsActivation) - $bNeedsLogin = true; - - // show error if member cannot login to admin - if ($member->isLoggedIn() && !$member->canLogin() && !$bIsActivation) { - $error = _ERROR_LOGINDISALLOWED; - $bNeedsLogin = true; - } - - if ($bNeedsLogin) - { - setOldAction($action); // see ADMIN::login() (sets old action in POST vars) - $action = 'showlogin'; - } - - sendContentType('application/xhtml+xml', 'admin-' . $action); - - $admin = new ADMIN(); - $admin->action($action); + 'install.sql should be deleted', + '../install.php' => 'install.php should be deleted', + 'upgrades' => 'nucleus/upgrades directory should be deleted', + 'convert' => 'nucleus/convert directory should be deleted' + ); + $aFound = array(); + foreach($aFiles as $fileName => $fileDesc) + { + if (@file_exists($fileName)) + array_push($aFound, $fileDesc); + } + if (@is_writable('../config.php')) { + array_push($aFound, 'config.php should be non-writable (chmod to 444)'); + } + if (sizeof($aFound) > 0) + { + startUpError( + '

One or more of the Nucleus installation files are still present on the webserver, or are writable.

You should remove these files or change their permissions to ensure security. Here are the files that were found by Nucleus

If you don\'t want to see this error message again, without solving the problem, set $CONF[\'alertOnSecurityRisk\'] in globalfunctions.php to 0, or do this at the end of config.php.

', + 'Security Risk' + ); + } + } + + if (!$member->isLoggedIn() || ($action == 'logout')) { + $HTTP_POST_VARS['oldaction'] = $action; // see ADMIN::login() + $_POST['oldaction'] = $action; + $action = "showlogin"; + } + + // show error if member cannot login to admin + if ($member->isLoggedIn() && !$member->canLogin()) { + $error = _ERROR_LOGINDISALLOWED; + $HTTP_POST_VARS['oldaction'] = $action; // see ADMIN::login() + $_POST['oldaction'] = $action; + $action = "showlogin"; + + } + + sendContentType('application/xhtml+xml', 'admin-' . $action); + + $admin = new ADMIN(); + $admin->action($action); ?> \ No newline at end of file