Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!!! WIP FEATURE: Add cr id to node address #4541

Closed
wants to merge 3 commits into from

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Sep 20, 2023

Resolves: #4564

Additionally i noticed that the api NodeAdress has a __toString method which is removed and instead one can now use toDebugString. related #4133

Resolves partially #4441

Upgrade instructions

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

@mhsdesign mhsdesign marked this pull request as draft September 20, 2023 10:22
@github-actions github-actions bot added the 9.0 label Sep 20, 2023
@@ -79,6 +80,7 @@ public function createFromUriString(string $serializedNodeAddress): NodeAddress
$dimensionSpacePoint = DimensionSpacePoint::fromUriRepresentation($dimensionSpacePointSerialized);
$nodeAggregateId = NodeAggregateId::fromString($nodeAggregateIdSerialized);

// hahah funny und nun?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm this is not easy to solve without breaking things.

The factory needs at construction already the correct cr id, so we cannot read it from the uri, because this is a non static method - and if we wanted to we need the cr registry ...

@mhsdesign
Copy link
Member Author

Thinking about this .. the NodeAddress only needs a crId to be 100% specific, which is only necessary for cross site linking.
In most cases 90% the crId is defined by the current domain - which maps to a site - which maps to a cr in the settings.

So maybe the crId should be made optional, that we dont have to specify it in the backend all the time?
Otherwise one could "hack" into other crs:

correct:

defaultCr.mydomain.de/neos/preview?node=default_324524q3_35q52532_352525235

invalid state to access otherCr from the wrong domain?

defaultCr.mydomain.de/neos/preview?node=other_324524q3_35q52532_352525235

@mhsdesign
Copy link
Member Author

Discussion should continue in #4564 this was just a non working stash.

#4564

@mhsdesign mhsdesign closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split up NodeAddress into dedicated classes
1 participant