Welcome Guest, Not a member yet? Register   Sign In
Honeypot Codeigniter 4

(This post was last modified: 10-18-2022, 04:17 AM by BrusterThemand.)

how is it possible to catch the honeypot-exception in Codeigniter 4?

I simulated the bot, so that the field of honeypot is filled. But CI4 is throwing the exception instantly. I would like to log that access into my db and want to redirect to a "jail" site where the program is setting a sleep function for that user.. so for every try he must wait longer for an answer.

Any suggestions?

Current Exception I get: CodeIgniter\Honeypot\Exceptions\HoneypotException #3 Honeypot.theClientIsABot

* @return void
public function before(RequestInterface $request, $arguments = null)
      $honeypot = Services::honeypot(new \Config\Honeypot());
      if ($honeypot->hasContent($request))
          throw HoneypotException::isBot();
This information is shown.

The Honeypot is enabled omegle.2yu.co in the system. The Config-File of Honeypot just let you configure the Input-Field itself. Not 'what should happen if omeglz echat honeypot isset'.

My .env file:

honeypot.hidden    = 'true'
honeypot.label      = 'What is 12 + 2?'
honeypot.name      = 'answer'
honeypot.template  = '<label>{label}</label><input type="text" id="
{name}" name="{name}" value=""/>'
honeypot.container  = '<div style="display:none">{template}</div>'

Extend the Honeypot filter.

Theme © iAndrew 2016 - Forum software by © MyBB