Fix typo in coreshop.security.frontend_regex breaking the pimcore-studio exclusion - #3164
Merged
Conversation
…dio exclusion The negative lookahead read (?!admin|!pimcore-studio) - the stray '!' made the second alternative match the literal string '!pimcore-studio', so /pimcore-studio was never excluded from the CoreShop frontend firewall pattern. Also align the installation docs, which never mentioned the pimcore-studio exclusion at all, and spell out that coreshop_frontend has to be declared after the pimcore_studio firewall.
dpfaffenbauer
force-pushed
the
issue/3145
branch
from
August 21, 2026 07:23
d40381a to
2756bc2
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #3145
Targets
5.1, the oldest affected branch —2026.xcarries the identical typo and picks the fix up through the normal upmerge, so there is no second PR.Problem
config/packages/security.yamldefines the frontend firewall pattern as:The second
!is a typo. Inside a negative lookahead the alternationadmin|!pimcore-studiomatches the literal string!pimcore-studio, so/pimcore-studiowas never excluded from the CoreShop frontend firewall pattern.The symptom is subtle: logging into Pimcore Studio appears to work, but every subsequent
/pimcore-studio/apirequest is anonymous ("No pimcore user found"), because the request can be picked up by the shop firewall with its own (context: shop) session context instead of the Studio one.Fix
Firewall order
Checked as part of the same failure mode, on this branch:
pimcore_studiois declared beforecoreshop_frontend(the classicpimcore_adminfirewall above it is commented out), which is correct — Symfony uses the first firewall whose pattern matches. No change needed.The installation docs only said to add
coreshop_frontend"after the other entries", which is now made explicit.Verification
Mechanical check of both patterns against the relevant paths. The two patterns are read out of the real
config/packages/security.yaml—beforefrom5.1as it stands,afterfrom this branch — and matched withpreg_match, answering "does this path fall into the CoreShop frontend firewall?":Shop paths are unaffected; only
/pimcore-studio*changes classification, which is the intent.Blast radius
Grepped both
5.1and2026.xforfrontend_regexand for the spelled-out pattern:config/packages/security.yaml5.1docs/01_Getting_Started/00_Installation.md^/(?!admin)[^/]*, no Studio exclusion at all, identical on both branches — updated, so anyone following the install guide does not reproduce this bugsrc/CoreShop/Bundle/CoreBundle/Resources/config/pimcore/security.yml^/(?!admin)[^/]*on both branches; this file is stale Symfony-4-era config (anonymous: ~,encoder_factories) that nothing imports. Deliberately left alone — it is a separate cleanup, not part of this fixCHANGELOG-3.0.x.mdNo occurrences in app skeletons, install templates, demo/test app configs, or external-bundle docs.