You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading a node by uuid with specific version number does not correctly check permissions. The current perm check uses the READ_PERM instead of the READ_PUBLISHED perm when specifying the published version by number.
The perm check within NodeRootImpl#loadObjectByUuid should be adapted.
Additionally the NodeCrudHandler#handleRead method needs to be updated. It should not pre-determine the needed permission by inspecting the version parameter. The code must always use the READ_PUBLISHED perm in order to ensure that the NodeRootImpl#loadObjectByUuid method checks the content read permissions.
Adding the needed permission check will however change the current behaviour.
Current Behaviour
When loading a node using ?version=draft the empty node response will be returned (containing no fields).
When using ?version=published and loading a node with a non-existing language an error will be returned that the field could not be found in the current branch.
We should thus adapt this behaviour and ensure that it works the same for ?version=draft and ?version=published.
This change may however affect existing implementations.
Tests
NodeEndpointTest#testReadPublishedNodeNoPermission3 asserts the expected behaviour.
Loading a node by uuid with specific version number does not correctly check permissions. The current perm check uses the READ_PERM instead of the READ_PUBLISHED perm when specifying the published version by number.
The perm check within
NodeRootImpl#loadObjectByUuid
should be adapted.Potential fix:
Additionally the
NodeCrudHandler#handleRead
method needs to be updated. It should not pre-determine the needed permission by inspecting theversion
parameter. The code must always use theREAD_PUBLISHED
perm in order to ensure that theNodeRootImpl#loadObjectByUuid
method checks the content read permissions.Adding the needed permission check will however change the current behaviour.
Current Behaviour
When loading a node using
?version=draft
the empty node response will be returned (containing no fields).When using
?version=published
and loading a node with a non-existing language an error will be returned that the field could not be found in the current branch.We should thus adapt this behaviour and ensure that it works the same for
?version=draft
and?version=published
.This change may however affect existing implementations.
Tests
NodeEndpointTest#testReadPublishedNodeNoPermission3
asserts the expected behaviour.NodeEndpointTest#testReadPublishedNodesNoPermission2
contains additional assertions.The text was updated successfully, but these errors were encountered: