Skip to content
Snippets Groups Projects
Commit abbe20ae authored by aron novak's avatar aron novak Committed by Jürgen Haas
Browse files

Issue #3495238: Do not fail on missing IP address

parent b617779c
No related branches found
No related tags found
1 merge request!6Handle missing/emtpy IP at on4xx handler
Pipeline #393921 failed
......@@ -74,7 +74,11 @@ class CrowdSec extends HttpExceptionSubscriberBase {
* The event to process.
*/
public function on4xx(ExceptionEvent $event): void {
$this->buffer->addWhisperSignal($event->getRequest()->getClientIp());
$ip = $event->getRequest()->getClientIp();
if (empty($ip)) {
return;
}
$this->buffer->addWhisperSignal($ip);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment