UPDATE:
Look for this line in weblogin.processor.inc.php:
$url = $modx->config['server_protocol'].'://'.$_SERVER['SERVER_NAME'].$modx->makeURL($modx->documentIdentifier,'',"webloginmode=actp&wli=".$row['id']."&wlk=".$newpwdkey);
It’s contained in an IF block. Replace it with this:
if($_SERVER['SERVER_PORT']!='80') {
if($_SERVER['SERVER_PORT']=='443'){
$protocol = 'https';
$port='';
}else{
$protocol='http';
$port = ':'.$_SERVER['SERVER_PORT'];
}
$url = $protocol.'://'.$_SERVER['SERVER_NAME'].$port.$modx->makeURL($modx->documentIdentifier,'',"webloginmode=actp&wli=".$row['id']."&wlk=".$newpwdkey);
} else {
$url = $modx->config['server_protocol'].'://'.$_SERVER['SERVER_NAME'].$modx->makeURL($modx->documentIdentifier,'',"webloginmode=actp&wli=".$row['id']."&wlk=".$newpwdkey);
}
Basically, the logic is the same except that for Port 443, the protocol is forced to https, and the port number is omitted.
Note that this is only necessary when you have your WebLogin snippet on an SSL page.
Initial post is here:
I’ve tried the ’recover password’ feature of WebLogin, and the activation link looks like this (names have been changed to protect the innocent):
http://SERVER_NAME:443/directory/page.htm?webloginmode=actp&wli=2&wlk=yRAKyL3e
The problem is that Apache will freak if you try to access HTTP over port 443 (SSL).
I think the problem occurs in save_web_user.processor.php:
431 $message = str_replace("[+surl+]", $site_url, $message);
Where
$site_url is a global variable.
I suspect that config.inc.php is having a hard time figuring out whether or not SSL is enabled?
Disclosure:
Modx 1.0.4
Encryption Snippet 1.0.2
Apache 2.2
PHP 5.2.13
Windows 2003 Server