Details
-
Bug
-
Resolution: Fixed
-
Critical
-
1.13.5, 5.4.14, 2.5.10, 3.0.4
-
None
-
None
Description
Compound matchers with multiple operands pointing to multiple SiteAccess will result in serialized SiteAccess much bigger in size than before https://jira.ez.no/browse/EZP-31644 fix which may lead to 414 errors with HIncludes or ESI tags.
Steps to reproduce
1. Clean installation of eZ Platform 1.13+ containing https://jira.ez.no/browse/EZP-31644 on Apache2 webserver with the default configuration.
2. In ezplatform.yml:
siteaccess: list: - test_site - test_site2 - test_site3 - test_site4 - test_site5 - test_site6 - test_site7 - test_site8 - test_site9 - test_site10 - test_site11 - test_site12 - test_site13 - test_site14 - test_site15 groups: site_group: - test_site - test_site2 - test_site3 - test_site4 - test_site5 - test_site6 - test_site7 - test_site8 - test_site9 - test_site10 - test_site11 - test_site12 - test_site13 - test_site14 - test_site15 default_siteaccess: test_site match: URIElement: 1 Compound\LogicalAnd: test_site: matchers: Map\URI: site: true Map\Host: localhost: true match: test_site test_site2: matchers: Map\URI: site2: true Map\Host: localhost: true match: test_site2 test_site3: matchers: Map\URI: site3: true Map\Host: localhost: true match: test_site3 test_site4: matchers: Map\URI: site4: true Map\Host: localhost: true match: test_site4 test_site5: matchers: Map\URI: site5: true Map\Host: localhost: true match: test_site5 test_site6: matchers: Map\URI: site6: true Map\Host: localhost: true match: test_site6 test_site7: matchers: Map\URI: site7: true Map\Host: localhost: true match: test_site7 test_site8: matchers: Map\URI: site8: true Map\Host: localhost: true match: test_site8 test_site9: matchers: Map\URI: site9: true Map\Host: localhost: true match: test_site9 test_site10: matchers: Map\URI: site10: true Map\Host: localhost: true match: test_site10 test_site11: matchers: Map\URI: site11: true Map\Host: localhost: true match: test_site11 test_site12: matchers: Map\URI: site12: true Map\Host: localhost: true match: test_site12 test_site13: matchers: Map\URI: site13: true Map\Host: localhost: true match: test_site13 Map\Host: localhost: site # ... system: site_group: pagelayout: pagelayout.html.twig
3. Create pagelayout.html.twig:
<!doctype html> <html lang="en"> <body> <textarea readonly="readonly" style="width: 100%; height: 300px"> {{ render_hinclude(controller('ez_content:viewAction', {locationId: 42, viewType: 'line'} )) }} </textarea> </body> </html>
4. Go to http://localhost/site and copy value of src attribute of hx:include tag inside textarea. Open it in the browser.
Result
Request-URI Too Long
The requested URL's length exceeds the capacity limit for this server.
Urls before and after the fix (decoded for readability):
Url before fix
/_fragment?_path=locationId=42&viewType=line&serialized_siteaccess=O:38:"eZ\Publish\Core\MVC\Symfony\SiteAccess":3:{s:4:"name";s:9:"test_site";s:12:"matchingType";s:38:"compound:logicalAnd(Map\URI,+Map\Host)";s:7:"matcher";O:66:"eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalAnd":1:{s:14:"*subMatchers";a:2:{s:7:"Map\URI";O:54:"eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\URI":3:{s:6:"*map";a:0:{}s:13:"*reverseMap";a:0:{}s:6:"*key";s:4:"site";}s:8:"Map\Host";O:55:"eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host":3:{s:6:"*map";a:0:{}s:13:"*reverseMap";a:0:{}s:6:"*key";s:9:"localhost";}}}}&_format=html&_locale=en_GB&_controller=ez_content:viewAction&_hash=/5bKq8RoLAzkjxohJPoH1/JZNnGHFxWzOGH4LA474Fg=
Url after fix
/_fragment?_path=locationId=42&viewType=line&serialized_siteaccess={"name":"test_site","matchingType":"compound:logicalAnd(Map\\URI,+Map\\Host)","matcher":"eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\\LogicalAnd"}&serialized_siteaccess_matcher={"config":{"test_site":{"matchers":{"Map\\URI":{"site":true},"Map\\Host":{"localhost":true}},"match":"test_site"},"test_site2":{"matchers":{"Map\\URI":{"site2":true},"Map\\Host":{"localhost":true}},"match":"test_site2"},"test_site3":{"matchers":{"Map\\URI":{"site3":true},"Map\\Host":{"localhost":true}},"match":"test_site3"},"test_site4":{"matchers":{"Map\\URI":{"site4":true},"Map\\Host":{"localhost":true}},"match":"test_site4"},"test_site5":{"matchers":{"Map\\URI":{"site5":true},"Map\\Host":{"localhost":true}},"match":"test_site5"},"test_site6":{"matchers":{"Map\\URI":{"site6":true},"Map\\Host":{"localhost":true}},"match":"test_site6"},"test_site7":{"matchers":{"Map\\URI":{"site7":true},"Map\\Host":{"localhost":true}},"match":"test_site7"},"test_site8":{"matchers":{"Map\\URI":{"site8":true},"Map\\Host":{"localhost":true}},"match":"test_site8"},"test_site9":{"matchers":{"Map\\URI":{"site9":true},"Map\\Host":{"localhost":true}},"match":"test_site9"},"test_site10":{"matchers":{"Map\\URI":{"site10":true},"Map\\Host":{"localhost":true}},"match":"test_site10"},"test_site11":{"matchers":{"Map\\URI":{"site11":true},"Map\\Host":{"localhost":true}},"match":"test_site11"},"test_site12":{"matchers":{"Map\\URI":{"site12":true},"Map\\Host":{"localhost":true}},"match":"test_site12"},"test_site13":{"matchers":{"Map\\URI":{"site13":true},"Map\\Host":{"localhost":true}},"match":"test_site13"}},"matchersMap":{"test_site":{"Map\\URI":{"key":"site","map":{"site":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site2":{"Map\\URI":{"key":"site","map":{"site2":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site3":{"Map\\URI":{"key":"site","map":{"site3":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site4":{"Map\\URI":{"key":"site","map":{"site4":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site5":{"Map\\URI":{"key":"site","map":{"site5":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site6":{"Map\\URI":{"key":"site","map":{"site6":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site7":{"Map\\URI":{"key":"site","map":{"site7":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site8":{"Map\\URI":{"key":"site","map":{"site8":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site9":{"Map\\URI":{"key":"site","map":{"site9":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site10":{"Map\\URI":{"key":"site","map":{"site10":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site11":{"Map\\URI":{"key":"site","map":{"site11":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site12":{"Map\\URI":{"key":"site","map":{"site12":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"test_site13":{"Map\\URI":{"key":"site","map":{"site13":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}}},"subMatchers":{"Map\\URI":{"key":"site","map":{"site":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}}}&serialized_siteaccess_sub_matchers[eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\URI]={"key":"site","map":{"site":true},"reverseMap":null}&serialized_siteaccess_sub_matchers[eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host]={"key":"localhost","map":{"localhost":true},"reverseMap":null}&_format=html&_locale=en_GB&_controller=ez_content:viewAction&_hash=LRMzKHinG+uGbZdTxma7uBKwgo4JaLBQOD5JUDsVLT0=
Attachments
Issue Links
- relates to
-
EZP-31718 render_esi function will not be cached properly when using Compound Matcher
- Closed