Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session login throttle issue #10

Open
adrianbj opened this issue May 22, 2018 · 1 comment
Open

Session login throttle issue #10

adrianbj opened this issue May 22, 2018 · 1 comment

Comments

@adrianbj
Copy link

We need a friendly error message rather than an internal server error if the user enters the wrong password a couple of time and the throttle kicks in.

@somatonic
Copy link

somatonic commented Oct 16, 2018

That's why I always suggested to use $session->login in a try catch. This is an old one and I once tried to make note on all login code (even ones from Ryan himself) around the forum.

This module does make the same mistake....

This code in Throttle Module does send the error to the ProcessLogin. But on any other login code, it throws an Exception, which is nice not at all.

if($this->wire('process') == 'ProcessLogin') parent::error($error); 
         else throw new WireException($error); // ensures the error can't be missed in unknown API usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants