Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9117

Wrong redirection after login

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.7
    • 3.0.8-RC1
    • Login
    • None

    Description

      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()))),
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: