Commit c20c0859 authored by Mark Harding's avatar Mark Harding

(fix): ensure conflicting uuids are not sent to wrong recipients - resolves #548

parent d6e26eac
No related merge requests found
Pipeline #67438610 passed with stages
in 7 minutes and 18 seconds
......@@ -182,6 +182,10 @@ class notifications implements Interfaces\Api
$return = [];
// Formatting for legacy notification handling in frontend
foreach ($notifications as $key => $entity) {
if ($entity->getToGuid() != Core\Session::getLoggedInUser()->guid) {
error_log('[notification]: Mismatch of to_guid with uuid ' . $entity->getUuid());
continue;
}
$entityObj = Entities\Factory::build($entity->getEntityGuid());
$fromObj = Entities\Factory::build($entity->getFromGuid());
$toObj = Core\Session::getLoggedInUser();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment