Encode the sReturnTo argument to the login page, otherwise we may have problems with some urls

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-06-17 16:59:42 +00:00
committed by WineHQ
parent d02ea523b8
commit 3abcfefe00
2 changed files with 2 additions and 2 deletions

View File

@@ -209,7 +209,7 @@ function cmd_do_login()
if($iResult == SUCCESS)
{
$sReturnUrl = $aClean['sReturnTo'];
$sReturnUrl = urldecode($aClean['sReturnTo']);
if(!$sReturnUrl)
$sReturnUrl = apidb_fullurl("index.php");
addmsg("You are successfully logged in as '$oUser->sRealname'.", "green");

View File

@@ -907,7 +907,7 @@ function util_trim_description($sDescription)
to the current page once he has logged in */
function login_url()
{
$sCurrentUrl = $_SERVER['REQUEST_URI'];
$sCurrentUrl = urlencode($_SERVER['REQUEST_URI']);
$sLoginUrl = BASE."account.php?sCmd=login";
/* If we are on the login page that means the URL already contains an sReturnTo value,