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

Matching siteaccess on http header does not work

    XMLWordPrintable

    Details

      Description

      Matching by request header X-Siteaccess does not work because headers are being lower cased by Symfony HeaderBag.

      eZPublishCoreMVCSymfonySiteAccessRouter::match( SimplifiedRequest $request ) should contain:

       if ( isset( $request->headers['x-siteaccess'] ) )
             {
                 $siteaccessName = $request->headers['x-siteaccess'][0];
                 if ( !isset( $this->siteAccessList[$siteaccessName] ) )
                 {
                     unset( $this->siteAccess );
                     throw new InvalidSiteAccessException( $siteaccessName, array_keys( $this->siteAccessList ), 'x-siteaccess request header' );
                 }
      
                 $this->siteAccess->name = $siteaccessName;
                 $this->siteAccess->matchingType = 'header';
                 return $this->siteAccess;
             }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jerome.vieilledent-obsolete@ez.no Jérôme Vieilledent (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: