Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22204

"keep" value of ModuleViewAccessMode not working

    Details

      Description

      HTTP to HTTPS re-direct ocurrs even with ModuleViewAccessMode[layout/*]=keep.

      Steps to reproduce:

      1. Configure Apache for SSL;
      2. Create the following content structure:

      Home
      	Articles (folder)
      		Article 1 (article)
      

      3. Configure environment with SSLZones:

      [SSLZoneSettings]
      SSLZones=enabled
       
      SSLSubtrees[]
      SSLSubtrees[]=/Articles
       
      ModuleViewAccessMode[]
      ModuleViewAccessMode[content/*]=keep
      ModuleViewAccessMode[layout/*]=keep
      

      4. Go to http://mysite/eng/layout/set/print/Articles/Article-1. It will be re-directedt to HTTPS, and it shouldn't, because ModuleViewAccessMode[layout/*]=keep should ensure the previous access mode is kept.

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment - - edited

          In retrospect, I'm surprised the merged patch works at all. switchIfNeeded() will be called twice:

          • once for the module, in ezpkernelweb.php, before running the module:
            eZSSLZone::checkModuleView( $this->module->attribute( 'name' ), $functionName )
          • and once for the content (from content/view.php):
            eZSSLZone::checkNodeID( 'content', 'view', $NodeID );)

          So with this global deactivation of the SSLZone feature, the 2nd check doesn't redirect. I was able to reproduce that, but don't understand why you weren't... which version were your legacy only tests executed on ?

          The problem at hand here clearly is the dual execution in this particular module, and I'm really really not comfortable with the global approach.

          Show
          Bertrand Dunogier added a comment - - edited In retrospect, I'm surprised the merged patch works at all. switchIfNeeded() will be called twice: once for the module, in ezpkernelweb.php , before running the module: eZSSLZone::checkModuleView( $this->module->attribute( 'name' ), $functionName ) and once for the content (from content/view.php): eZSSLZone::checkNodeID( 'content', 'view', $NodeID ); ) So with this global deactivation of the SSLZone feature, the 2nd check doesn't redirect. I was able to reproduce that, but don't understand why you weren't... which version were your legacy only tests executed on ? The problem at hand here clearly is the dual execution in this particular module, and I'm really really not comfortable with the global approach.
          Hide
          Bertrand Dunogier added a comment -

          Documentation pull-request ezpublish-legacy#904.

          Show
          Bertrand Dunogier added a comment - Documentation pull-request ezpublish-legacy#904 .
          Hide
          Bertrand Dunogier added a comment -

          Doc PR merged to master @ec94ea0.

          Show
          Bertrand Dunogier added a comment - Doc PR merged to master @ec94ea0 .
          Show
          Sarah Haïm-Lubczanski (Inactive) added a comment - Updating Reference doc for site.ini file, in the legacy doc : http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SSLZoneSettings/ModuleViewAccessMode
          Hide
          Joao Pingo (Inactive) added a comment -

          QA Approved

          Show
          Joao Pingo (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Nuno Oliveira (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 2 hours, 50 minutes
                2d 2h 50m