Closed Ihabafia closed 6 years ago
Dear Anderson,
I think I catch a bug, it's in the Controller.com.
It's basically where you check how many times the user requested a password reset. Here is the code:
$requestCount = $this->db->where('email', $this->input->post('email')) ->where('created_at >=', date('Y-m-d H:i:s')) ->where('created_at <=', date('Y-m-d H:i:s', time() + (60 * 60 * 2))) // 2 hours ->count_all_results(config_item('simpleauth_password_resets_table'));
Here here is my suggestion, that makes it works:
$requestCount = $this->db->where('email', $this->input->post('email')) ->where('created_at <=', date('Y-m-d H:i:s')) ->where('created_at >=', date('Y-m-d H:i:s', time() - (60 * 60 * 2))) // 2 hours ->count_all_results(config_item('simpleauth_password_resets_table'));
The >= and <= are reversed, which at the moment it's checking how much time between now and the next 2 hours, while it's supposed to check how many times between now and the last 2 hours.
Thank you,
Dear Anderson,
I think I catch a bug, it's in the Controller.com.
It's basically where you check how many times the user requested a password reset. Here is the code:
Here here is my suggestion, that makes it works:
The >= and <= are reversed, which at the moment it's checking how much time between now and the next 2 hours, while it's supposed to check how many times between now and the last 2 hours.
Thank you,