WIP: BUGFIX: prevent workspace creation during route resolving #5455
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.
In slack it was noticed that all root paths starting with
@
are interpreted by the frontend node path handler as legacy node path. As far as i know the syntaxlocalhost/sites/neosdemo@test;language=en_US
was before #2654 used as preview endpoint for the neos ui. Now if both path and dimensions are empty the uri likelocalhost/@test
still gets matched. Or any path starting with@blabla
.The problem now is now that there is some weird behaviour in the code, which attempts to create the entered workspace when resolving but then persistAll is not called either way but there is a trace in the log telling that the auto creation of workspaces is deprecated:
With this pr i attempt to circumvent the odd workspace creation. But that in turn now bubbles up a new exception
NoWorkspaceException
that was previously never thrown because workspaces were auto created.Now changing this behaviour might seem correct but we will leak information to the unauthorised user in the following way:
Existing workspaces like
/@user-admin
will be redirected to the login while non existing workspaces like/@test
will now cause a 404.Until we have discussed this the pr must not be merged.
Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions