Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The default server port is set to 80, causing error when SSL is used in Drupal.
Comment | File | Size | Author |
---|---|---|---|
#2 | simplesamlphp_auth-Set_server_port_to_433_when_HTTPS_is_used-2829265-2-D7.patch | 620 bytes | KelvinWong |
Comments
Comment #2
KelvinWong CreditAttribution: KelvinWong commentedAdded HTTPS check and set server port to 443 when HTTPS is used.
Comment #3
snufkin CreditAttribution: snufkin commentedThis is something that Drupal generally should be able to handle, I don't see why we need to manage this within the module itself. Are you handling SSL traffic after SSL termination on an LB layer?
Comment #4
cloris CreditAttribution: cloris commentedI just hit this issue simplesamlphp 1.14 and simplesamlhttp_auth 7.2-3.x-dev and your patch worked well. After a little more research, it looks like the underlying issue for me was with simplesamlphp and my load balancers. See this discussion - https://github.com/simplesamlphp/simplesamlphp/issues/450#issuecomment-2.... If you terminate your SSL on a LB in front of Drupal, then the server thinks it is on port 80 but Drupal thinks it is using SSL. This is where the fun happens. It does not appear to be a simplesamlphp_auth issue.
Comment #5
aprohl5 CreditAttribution: aprohl5 as a volunteer commentedThis is not an issue with the module, but can be resolved by adding the following snippet to config.php in your simplesaml library. Possibly at a location such as /simplesamlphp-1.14.11/config/config.php in your git repo.
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
$_SERVER['SERVER_PORT'] = 443;
$_SERVER['HTTPS'] = 'true';
}
I am closing this issue as the error is not with the module.
Comment #6
aprohl5 CreditAttribution: aprohl5 as a volunteer commented