#009411: sslzones redirect to non-ssl fails, trivial patch

Description:

sslzones is failing to redirect from https to http due to a bug inadvertently introduced in revision 17417, when the check to determine current access method (http or https) was moved out to ezsys.php. Result:

Fatal error: Call to a member function on a non-object in /eb/apps/ez/3.8/kernel/classes/ezsslzone.php on line 235
Fatal error: eZ publish did not finish its request

Patch:

<code>Index: kernel/classes/ezsslzone.php
===================================================================
--- kernel/classes/ezsslzone.php (revision 17453)

kernel/classes/ezsslzone.php (working copy)

@@ -231,6 +231,7 @@
if ( $nowSSL && !$inSSL )
{
// switch to plain HTTP

$ini =& eZINI::instance();

$host = $ini->variable( 'SiteSettings', 'SiteURL' );
$sslZoneRedirectionURL = "http://" . $host . $requestURI;
}</code>

I'm a little surprised by this, since a simple check to see if sslzones was worked as expected after this patch was applied should have revealed this bug.

Thanks
Matthew


Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:


- Attachments

No attachments for this issue.


- Comments

well, that's a little garbled isn't it. let's try that again:


Index: kernel/classes/ezsslzone.php
===================================================================
--- kernel/classes/ezsslzone.php        (revision 17453)
+++ kernel/classes/ezsslzone.php        (working copy)
@@ -231,6 +231,7 @@
         if ( $nowSSL && !$inSSL )
         {
             // switch to plain HTTP
+            $ini =& eZINI::instance();
             $host = $ini->variable( 'SiteSettings', 'SiteURL' );
             $sslZoneRedirectionURL = "http://" . $host  . $requestURI;
         }
#250228 by Matthew Carroll on November 14th, 2006 [Permanent Link]

This issue also affects switchIfNeeded in trunk and 3.9 RC1, not just 3.8 stable svn. Please could someone mark it as such since I can't seem to edit my own bug report.

If this is released in 3.9 it will break all sites that use SSL zones.

Thanks
Matthew

#250427 by Matthew Carroll on November 21st, 2006 [Permanent Link]

Fixed in stable/3.8 (3.8.7) rev. 17726, trunk (3.9.0) rev. 17727.

#250867 by Kirill Subbotin on December 11th, 2006 [Permanent Link]

- History
Properties
Type Bug
Priority Medium
Component Misc
Affects 3.8.6
Fix Version -
Reporter Matthew Carroll
Responsible Kirill Subbotin
Status 0 Closed
Resolution Fixed
Created November 14th, 2006
Updated December 11th, 2006
Resolved December 11th, 2006
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #019127
  DB Deadlocks on ezcontentobject_tree when updating subnode