diff options
author | 3Di <three3di@hotmail.it> | 2018-10-26 18:33:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-26 18:33:30 +0200 |
commit | 379900b4eda527d91c2e3252db5e3b89038bc425 (patch) | |
tree | 6c8db1854d475b2b15c1b5c98c77e5f9f9fa1ff3 /phpBB/includes/functions.php | |
parent | 001f32da95d4f8697ccc9a6107afc8dc68cbe48e (diff) | |
parent | fd95355c6129043e09d189c193ff5d1abde8db96 (diff) | |
download | forums-379900b4eda527d91c2e3252db5e3b89038bc425.tar forums-379900b4eda527d91c2e3252db5e3b89038bc425.tar.gz forums-379900b4eda527d91c2e3252db5e3b89038bc425.tar.bz2 forums-379900b4eda527d91c2e3252db5e3b89038bc425.tar.xz forums-379900b4eda527d91c2e3252db5e3b89038bc425.zip |
Merge pull request #2 from phpbb/3.2.x
3.2.x
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 1457888c9f..3fec88a354 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1744,14 +1744,14 @@ function redirect($url, $return = false, $disable_cd_check = false) if ($url_parts === false) { // Malformed url - trigger_error('INSECURE_REDIRECT', E_USER_ERROR); + trigger_error('INSECURE_REDIRECT', E_USER_WARNING); } else if (!empty($url_parts['scheme']) && !empty($url_parts['host'])) { // Attention: only able to redirect within the same domain if $disable_cd_check is false (yourdomain.com -> www.yourdomain.com will not work) if (!$disable_cd_check && $url_parts['host'] !== $user->host) { - trigger_error('INSECURE_REDIRECT', E_USER_ERROR); + trigger_error('INSECURE_REDIRECT', E_USER_WARNING); } } else if ($url[0] == '/') @@ -1791,13 +1791,13 @@ function redirect($url, $return = false, $disable_cd_check = false) if (!$disable_cd_check && strpos($url, generate_board_url(true) . '/') !== 0) { - trigger_error('INSECURE_REDIRECT', E_USER_ERROR); + trigger_error('INSECURE_REDIRECT', E_USER_WARNING); } // Make sure no linebreaks are there... to prevent http response splitting for PHP < 4.4.2 if (strpos(urldecode($url), "\n") !== false || strpos(urldecode($url), "\r") !== false || strpos($url, ';') !== false) { - trigger_error('INSECURE_REDIRECT', E_USER_ERROR); + trigger_error('INSECURE_REDIRECT', E_USER_WARNING); } // Now, also check the protocol and for a valid url the last time... @@ -1806,7 +1806,7 @@ function redirect($url, $return = false, $disable_cd_check = false) if ($url_parts === false || empty($url_parts['scheme']) || !in_array($url_parts['scheme'], $allowed_protocols)) { - trigger_error('INSECURE_REDIRECT', E_USER_ERROR); + trigger_error('INSECURE_REDIRECT', E_USER_WARNING); } /** @@ -2363,10 +2363,12 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa * @event core.login_box_redirect * @var string redirect Redirect string * @var bool admin Is admin? + * @var array result Result from auth provider * @since 3.1.0-RC5 * @changed 3.1.9-RC1 Removed undefined return variable + * @changed 3.2.4-RC1 Added result */ - $vars = array('redirect', 'admin'); + $vars = array('redirect', 'admin', 'result'); extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars))); // append/replace SID (may change during the session for AOL users) @@ -2539,7 +2541,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa */ function login_forum_box($forum_data) { - global $db, $phpbb_container, $request, $template, $user, $phpbb_dispatcher; + global $db, $phpbb_container, $request, $template, $user, $phpbb_dispatcher, $phpbb_root_path, $phpEx; $password = $request->variable('password', '', true); @@ -2624,6 +2626,8 @@ function login_forum_box($forum_data) 'body' => 'login_forum.html') ); + make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_data['forum_id']); + page_footer(); } @@ -4506,7 +4510,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'S_COOKIE_NOTICE' => !empty($config['cookie_notice']), 'T_THEME_NAME' => rawurlencode($user->style['style_path']), - 'T_THEME_LANG_NAME' => $user->data['user_lang'], + 'T_THEME_LANG_NAME' => $user->lang_name, 'T_TEMPLATE_NAME' => $user->style['style_path'], 'T_SUPER_TEMPLATE_NAME' => rawurlencode((isset($user->style['style_parent_tree']) && $user->style['style_parent_tree']) ? $user->style['style_parent_tree'] : $user->style['style_path']), 'T_IMAGES' => 'images', |