Menu

#212 Problem in url redirection

closed-fixed
nabber00
None
5
2010-09-14
2008-10-31
No

The redirect_to_url function may set \ instead of / in the url. In this case, Firefox can't redirect to the page.

In sb_login.php change :

function redirect_to_url( $relative_url = "index.php" ) {
$baseurl = baseurl();
header('Location: ' . $baseurl . $relative_url);
exit;
}

with

function redirect_to_url( $relative_url = "index.php" ) {
$baseurl = baseurl();
/* fix \ problem */
$redirectUrl = str_replace('\\', '/', $baseurl . $relative_url); /* ensure there is no \ in the url */
header('Location: ' . $redirectUrl);
exit;
}

Hope this helps

Discussion

  • nabber00

    nabber00 - 2010-09-14

    This is only a problem if a Windows webserver is used. Fixed in svn r70.

     
  • nabber00

    nabber00 - 2010-09-14
    • labels: 626487 -->
    • assigned_to: nobody --> nabber00
    • status: open --> closed-fixed
     

Log in to post a comment.