mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 15:01:33 +02:00
necessary changes...
git-svn-id: file:///svn/phpbb/trunk@8072 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -46,7 +46,7 @@ class acp_captcha
|
||||
}
|
||||
$captcha = new captcha();
|
||||
$captcha->execute(gen_rand_string(mt_rand(5, 8)), time());
|
||||
exit;
|
||||
exit_handler();
|
||||
}
|
||||
|
||||
$config_vars = array(
|
||||
|
@@ -41,7 +41,7 @@ class acp_forums
|
||||
$total = request_var('total', 0);
|
||||
|
||||
$this->display_progress_bar($start, $total);
|
||||
exit;
|
||||
exit_handler();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
|
@@ -36,6 +36,15 @@ function login_apache(&$username, &$password)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// do not allow empty password
|
||||
if (!$password)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_BREAK,
|
||||
'error_msg' => 'NO_PASSWORD_SUPPLIED',
|
||||
);
|
||||
}
|
||||
|
||||
if (!isset($_SERVER['PHP_AUTH_USER']))
|
||||
{
|
||||
return array(
|
||||
|
@@ -20,6 +20,15 @@ function login_db(&$username, &$password)
|
||||
{
|
||||
global $db, $config;
|
||||
|
||||
// do not allow empty password
|
||||
if (!$password)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_BREAK,
|
||||
'error_msg' => 'NO_PASSWORD_SUPPLIED',
|
||||
);
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
|
||||
|
@@ -92,6 +92,15 @@ function login_ldap(&$username, &$password)
|
||||
{
|
||||
global $db, $config, $user;
|
||||
|
||||
// do not allow empty password
|
||||
if (!$password)
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_BREAK,
|
||||
'error_msg' => 'NO_PASSWORD_SUPPLIED',
|
||||
);
|
||||
}
|
||||
|
||||
if (!@extension_loaded('ldap'))
|
||||
{
|
||||
return array(
|
||||
|
@@ -9,6 +9,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* valid external constants:
|
||||
* PHPBB_MSG_HANDLER
|
||||
* PHPBB_ROOT_PATH
|
||||
* PHPBB_ADMIN_PATH
|
||||
*/
|
||||
|
||||
// User related
|
||||
|
@@ -651,8 +651,10 @@ class dbal
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
exit;
|
||||
break;
|
||||
|
||||
exit_handler();
|
||||
|
||||
break;
|
||||
|
||||
case 'stop':
|
||||
$endtime = explode(' ', microtime());
|
||||
|
@@ -1577,6 +1577,8 @@ function on_page($num_items, $per_page, $start)
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false);
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2));
|
||||
* </code>
|
||||
*
|
||||
* Ability to use own function <code>append_sid_phpbb_hook</code> as a hook. It is called in favor of this function.
|
||||
*/
|
||||
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
||||
{
|
||||
@@ -2107,12 +2109,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
trigger_error('NO_AUTH_ADMIN_USER_DIFFER');
|
||||
}
|
||||
|
||||
// do not allow empty password
|
||||
if (!$password)
|
||||
{
|
||||
trigger_error('NO_PASSWORD_SUPPLIED');
|
||||
}
|
||||
|
||||
// If authentication is successful we redirect user to previous page
|
||||
$result = $auth->login($username, $password, $autologin, $viewonline, $admin);
|
||||
|
||||
@@ -3572,8 +3568,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
|
||||
}
|
||||
else
|
||||
{
|
||||
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
|
||||
$profile_url .= '&u=' . (int) $user_id;
|
||||
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3794,7 +3789,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
|
||||
exit;
|
||||
exit_handler();
|
||||
break;
|
||||
|
||||
case E_USER_WARNING:
|
||||
@@ -3853,7 +3848,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
page_footer();
|
||||
}
|
||||
|
||||
exit;
|
||||
exit_handler();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4303,11 +4298,7 @@ function page_footer($run_cron = true)
|
||||
$template->display('body');
|
||||
|
||||
garbage_collection();
|
||||
|
||||
if (!defined('PHPBB_EMBEDDED'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
exit_handler();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4331,6 +4322,21 @@ function garbage_collection()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for exit calls in phpBB
|
||||
*
|
||||
* Ability to use own function <code>exit_handler_phpbb_hook</code> as a hook. It is called in favor of this function.
|
||||
*/
|
||||
function exit_handler()
|
||||
{
|
||||
if (function_exists('exit_handler_phpbb_hook'))
|
||||
{
|
||||
return exit_handler_phpbb_hook();
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @package phpBB3
|
||||
*/
|
||||
|
@@ -1784,7 +1784,7 @@ function add_bots()
|
||||
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
|
||||
'Francis [Bot]' => array('http://www.neomo.de/', ''),
|
||||
'Gigabot [Bot]' => array('Gigabot/', ''),
|
||||
'Google Adsense [Bot]' => array('Mediapartners-Google/', ''),
|
||||
'Google Adsense [Bot]' => array('Mediapartners-Google', ''),
|
||||
'Google Desktop' => array('Google Desktop', ''),
|
||||
'Google Feedfetcher' => array('Feedfetcher-Google', ''),
|
||||
'Google [Bot]' => array('Googlebot', ''),
|
||||
|
Reference in New Issue
Block a user