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
if ($ipCount >= Constants::MAX_ALLOWED_IP_RANGE_WIDTH) {
273
+
thrownewBouncerException("Unable to store the decision ${$decision['id']}, the IP range: ${$decision['value']} is too large and can cause storage problem. Decision ignored.");
274
+
}
275
+
} while (0 !== strcmp($address->getComparableString(), $comparableEndAddress));
257
276
}
258
277
}
259
278
@@ -264,18 +283,44 @@ private function removeRemediations(array $decisions): int
264
283
{
265
284
$count = 0;
266
285
foreach ($decisionsas$decision) {
267
-
if (\is_int($decision['start_ip']) && \is_int($decision['end_ip'])) {
if (!$this->removeDecisionFromRemediationItem($ip, $decision['id'])) {
307
+
do {
308
+
$address = $address->getNextAddress();
309
+
if (!$this->removeDecisionFromRemediationItem($address->toString(), $decision['id'])) {
275
310
$success = false;
276
311
}
277
-
}
312
+
++$ipCount;
313
+
if ($ipCount >= Constants::MAX_ALLOWED_IP_RANGE_WIDTH) {
314
+
thrownewBouncerException("Unable to store the decision ${$decision['id']}, the IP range: ${$decision['value']} is too large and can cause storage problem. Decision ignored.");
315
+
}
316
+
} while (0 !== strcmp($address->getComparableString(), $comparableEndAddress));
317
+
278
318
if ($success) {
319
+
$this->logger->debug('', [
320
+
'type' => 'DECISION_REMOVED',
321
+
'decision' => $decision['id'],
322
+
'value' => $decision['value'],
323
+
]);
279
324
++$count;
280
325
} else {
281
326
// The API may return stale deletion events due to API design.
0 commit comments