beat wrote:
Just to be clear, this is not a CB bug, but a joomla bug
Actually, I hate to break it to you, but this IS a CB bug, not a Joomla bug. Here's the problematic code:
[code:1]
// variant 1: (13 lines up to variant 2):
$request_uri = mosGetParam( $_SERVER, 'REQUEST_URI', null );
$isHttps = (isset($_SERVER) && ( !empty( $_SERVER ) ) && ($_SERVER != 'off') );
if (!(strncmp($request_uri, "http:", 5)==0) && !(strncmp($request_uri, "https:", 6)==0)) {
$return = "http".( $isHttps ?"s":""«»)
."://".mosGetParam( $_SERVER, 'HTTP_HOST', null ).((strpos($request_uri, '/') !== 0) ? "/":""«»).$request_uri;
} else {
$return = $request_uri;
}
if (strncmp($mosConfig_live_site, $return, $len_live_site) == 0) {
$return = substr($return, $len_live_site);
if (strncmp($return,"/",1) == 0) {
$return = substr($return, 1);
}
}
[/code:1]
THANKFULLY, there is a true workaround to this, just a few lines down.
All you have to do iscomment all of the above code, so it looks like:
[code:1]
/*
// variant 1: (13 lines up to variant 2):
$request_uri = mosGetParam( $_SERVER, 'REQUEST_URI', null );
$isHttps = (isset($_SERVER) && ( !empty( $_SERVER ) ) && ($_SERVER != 'off') );
if (!(strncmp($request_uri, "http:", 5)==0) && !(strncmp($request_uri, "https:", 6)==0)) {
$return = "http".( $isHttps ?"s":""«»)
."://".mosGetParam( $_SERVER, 'HTTP_HOST', null ).((strpos($request_uri, '/') !== 0) ? "/":""«»).$request_uri;
} else {
$return = $request_uri;
}
if (strncmp($mosConfig_live_site, $return, $len_live_site) == 0) {
$return = substr($return, $len_live_site);
if (strncmp($return,"/",1) == 0) {
$return = substr($return, 1);
}
}
*/
[/code:1]
What was happening here (at least for ME) was the return URL (ie: as sent by your form) was not sent properly to the form. It's the script's responsibility to verify that the data sent to it is properly done.
By commenting out the above lines, AND chaanging
[code:1]
// $return = 'index.php?' . mosGetParam( $_SERVER, 'QUERY_STRING', '' );
[/code:1]
to
[code:1]
$return = 'index.php?' . mosGetParam( $_SERVER, 'QUERY_STRING', '' );
[/code:1]
this solved my issues, nd allowed individuals to login, and register quite successfully, whereas before, not so much. I'd get redirected to the default opendns 404 page.
Not sure what's wrong with the coding for the first box, not really concerned, but it's improperly done.
Post edited by: twhiting9275, at: 2008/01/24 05:10