Skip to content

Commit

Permalink
Fixed issue #8682: Force SSL fails when HTTPS not directly handled by…
Browse files Browse the repository at this point in the history
… web server - patch by leexxx
  • Loading branch information
c-schmitz committed Feb 7, 2014
1 parent fc74fd2 commit 0b4b2e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/helpers/common_helper.php
Expand Up @@ -5849,7 +5849,9 @@ function SSLRedirect($enforceSSLMode)
*/
function enforceSSLMode()
{
$bSSLActive = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off");
$bSSLActive = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off")||
$_SERVER['HTTP_FORWARDED_PROTO']=="https"||

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Feb 7, 2014

Collaborator

Undefined index: HTTP_FORWARDED_PROTO in some server (and config['debug']>1) ;)

This comment has been minimized.

Copy link
@c-schmitz

c-schmitz Feb 7, 2014

Author Contributor

Thanks, fixed!

$_SERVER['HTTP_X_FORWARDED_PROTO']=="https");
if (Yii::app()->getConfig('ssl_emergency_override') !== true )
{
$force_ssl = strtolower(getGlobalSetting('force_ssl'));
Expand Down

0 comments on commit 0b4b2e8

Please sign in to comment.