-
Notifications
You must be signed in to change notification settings - Fork 228
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
update_failed_logins_count is called twice when login failed #163
Conversation
I was under the impression that @kissrobber would you mind helping me understand what's going wrong here? |
in rails in sorcery |
Sorry I closed this PR by mistake. |
@kissrobber That shouldn't cause a duplication issue though, API and Base don't inherit each other as far as I can tell. This change would break applications that use API for a subset of controllers, and Base for the rest. Can you provide a minimal example controller so I can replicate this issue and try it out? |
That doesn't matter here. In the original code,
Then both So, this called twice
The Config
You mean it has been confirmed that this issue doesn't occur in your code? |
Ahh, I understand the issue now. I thought it was some weird inheritance, but it's just the Don't worry about the example, I was just misunderstanding the problem. |
Closes #172 |
Is @kissrobber's solution a reasonable monkey patch for this issue? Need a stopgap upgrade in response to CVE-2019-5418 and CVE-2019-5419. Thanks! |
Sorry for the delay, will merge this into master after CI passes. Not fully convinced this solves all the potential issues with double inclusion, but I confirmed locally that this prevents the double callbacks for the controller submodules. |
Failed_logins_count is incremented by 2 when login failed.
login failed request SQL log
Config.after_failed_login and Config.after_login are set doubly