Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-2327

Cross Origin Helper fails on attachments in multi host environments

    XMLWordPrintable

    Details

      Description

      When using the Enterprise Edition, the event subscriber of ezsystems/ezplatform-page-builder (file src/lib/Event/Subscriber/InjectCrossOriginHelperSubscriber.php) is triggered on the responses.

      In the injectSnippet function of this file, there is a call on the ->getResponse() method of the HTTP Request, which, in case of a BinaryStreamResponse from ezsystems/ezpublish-kernel (https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Bundle/EzPublishIOBundle/BinaryStreamResponse.php#L227) will always return null and break the next instruction (strripos native php function that cannot work with a null argument).

      This problem mainly breaks all front content/download links ans also some use cases while using the DFS.

      Problem reported here and here on slack and investigated with Kevin Dejour from eZ.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            amval@smile.fr Amaury Vallier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: