Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9117

Wrong redirection after login

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.8-RC1
    • 3.0.7
    • Login
    • None

      When we call login_box() function with $redirect parameter then are rendered two hidden fields - both named "redirect". First field come from $redirect parameter, second fields comes from

      {S_LOGIN_REDIRECT}

      and is hardcoded in page_header() function. First field value is overwriten by second field and redirection not work valid.

      Here is my solution for it:

      2942,2946d2941
      < 	if ($redirect)
      < 	{
      < 		$s_hidden_fields['redirect'] = $redirect;
      < 	}
      < 
      2964a2960
      > 		'S_LOGIN_REDIRECT'      => $redirect ? build_hidden_fields(array('redirect' => $redirect)) : null,
      4241c4237
      < 		'S_LOGIN_REDIRECT'		=> build_hidden_fields(array('redirect' => str_replace('&amp;', '&', build_url()))),
      ---
      > 		'S_LOGIN_REDIRECT'      => isset($template->_rootref['S_LOGIN_REDIRECT']) && $template->_rootref['S_LOGIN_REDIRECT'] ? $template->_rootref['S_LOGIN_REDIRECT'] : build_hidden_fields(array('redirect' => str_replace('&amp;', '&', build_url()))),
      

            rxu rxu
            davidpl davidpl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: