Commit c20c0859 authored by Mark Harding's avatar Mark Harding
Browse files

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

parent d6e26eac
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -182,6 +182,10 @@ class notifications implements Interfaces\Api
        $return = [];
        $return = [];
        // Formatting for legacy notification handling in frontend
        // Formatting for legacy notification handling in frontend
        foreach ($notifications as $key => $entity) {
        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());
            $entityObj = Entities\Factory::build($entity->getEntityGuid());
            $fromObj = Entities\Factory::build($entity->getFromGuid());
            $fromObj = Entities\Factory::build($entity->getFromGuid());
            $toObj = Core\Session::getLoggedInUser();
            $toObj = Core\Session::getLoggedInUser();