diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 4c5c912cb9..fbb1b16684 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,2 +1,3 @@ - Fix: wrong date values should not allowed in subscription's expires field (#4541) -- Fix: do not raise DB alarm in case of wrong GeoJSON in client request \ No newline at end of file +- Fix: do not raise DB alarm in case of wrong GeoJSON in client request +- Fix: extend loop protection to any request (not only custom notifications) to cover potential update loops due to CEP integration diff --git a/src/lib/mongoBackend/MongoCommonUpdate.cpp b/src/lib/mongoBackend/MongoCommonUpdate.cpp index 3e5b3b28ff..c0cdce34a7 100644 --- a/src/lib/mongoBackend/MongoCommonUpdate.cpp +++ b/src/lib/mongoBackend/MongoCommonUpdate.cpp @@ -3651,10 +3651,10 @@ static unsigned int updateEntity *attributeNotExistingList += " ]"; *attributeAlreadyExistsList += " ]"; - // The logic to detect notification loops is to check that the correlator in the request differs from the last one seen for the entity and, - // in addition, the request was sent due to a custom notification + // The logic to detect notification loops is to check that the correlator in the request differs from the last one seen for the entity + // (for any kind of request, not only forged by custom notification, e.g. CEP rule) bool loopDetected = false; - if ((ngsiV2AttrsFormat == "custom") && (r.hasField(ENT_LAST_CORRELATOR))) + if (r.hasField(ENT_LAST_CORRELATOR)) { loopDetected = (getStringFieldF(r, ENT_LAST_CORRELATOR) == correlatorRoot(fiwareCorrelator)); }