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

Use new brute force middleware for locking a token #7696

Closed
4 tasks
kirrg001 opened this issue Nov 8, 2016 · 3 comments
Closed
4 tasks

Use new brute force middleware for locking a token #7696

kirrg001 opened this issue Nov 8, 2016 · 3 comments
Labels
server / core Issues relating to the server or core of Ghost

Comments

@kirrg001
Copy link
Contributor

kirrg001 commented Nov 8, 2016

We are using a new brute force middleware unit in current master, see https://github.com/TryGhost/Ghost/pull/7579/files.

I've added a TODO in one of my previous PR's, see https://github.com/TryGhost/Ghost/blob/2.9.1/core/server/api/v0.1/authentication.js#L276

We would like to use the new brute force middleware for locking a token if too many tries.

  • consider if we can replace this by our brute force middleware
  • delete brute protection in the api authentication file
  • use brute middleware for this route (register as middleware)
  • add tests or check if we have enough tests

Please read also through the conversation here https://github.com/TryGhost/Ghost/pull/7579/files#r86813677
It contains already a solution how this could be replaced.

@kirrg001 kirrg001 added the server / core Issues relating to the server or core of Ghost label Nov 8, 2016
@kirrg001 kirrg001 added the help wanted [triage] Ideal issues for contributors to help with label Apr 3, 2017
@ErisDS
Copy link
Member

ErisDS commented Jan 2, 2019

@kirrg001 is this still relevant given the new authentication methods? Should it be prioritised or closed?

@kirrg001
Copy link
Contributor Author

kirrg001 commented Jan 2, 2019

The new authentication methods and the v2 API still use the reset password controller logic. You can still login with username/password and you can still reset a password.

IMO yes, this is still relevant. And a refactoring would be very useful, because if we support multiple API versions, we don't want to copy this code around. IMO we should aim for as less as possible code in controllers. It would be great if the brute force middleware could handle this case:

consider if we can replace this by our brute force middleware

I have removed the help wanted label and added it to the backlog.

@kirrg001 kirrg001 removed the help wanted [triage] Ideal issues for contributors to help with label Jan 2, 2019
@ErisDS
Copy link
Member

ErisDS commented Jan 24, 2019

Closing as we intend to replace our brute force logic soon.

@ErisDS ErisDS closed this as completed Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

No branches or pull requests

2 participants