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

Prevent password reset brute force #778

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Jan 8, 2016

  1. Merge pull request #6 from panique/master

    update master
    geozak committed Jan 8, 2016
    Configuration menu
    Copy the full SHA
    60a9eed View commit details
    Browse the repository at this point in the history
  2. Added messages to support changes in verifyPasswordReset

    Added messages to support changes in PasswordResetModel::verifyPasswordReset
    geozak committed Jan 8, 2016
    Configuration menu
    Copy the full SHA
    6fa6e6e View commit details
    Browse the repository at this point in the history
  3. Added expirePasswordReset and altered verifyPasswordReset

    Added a method named expirePasswordReset to be used with verifyPasswordReset to mark existing password reset requests as expired when it is detected that fake attempts are being used.
    
    modified verifyPasswordReset in a few ways.
    1. Made the query search for just username instead of the username/verification code combo
    2. Added feedback for if user does not exist.
    3. Added feedback for if verification code does not exist for selected user
    4. Added feedback for if verification code does not match the selected users current code
        and calls the expirePasswordReset method to current code invalid
    
    These changes assume that one bad guess at a verification code is an attempted attack. A better solution might include keeping a tally that way if  users click on old link by mistake they don't have to start the process over, but that probably requires using altering the database structure slightly and I don't know if that would be desired, but can be easily added into here if its.
    
    Steps need incorporate a tally system:
    1. Add field in database users table for number of attempts
    2. Add value in config file for max number of attempts
    3. Make setPasswordResetDatabaseToken set number of attempts to 0
    4. make expirePasswordReset read the current number of attempts.
    5.a. make expirePasswordReset update number of attempts
    5.b  make expirePasswordReset update the timestamp to make it expired
    geozak committed Jan 8, 2016
    Configuration menu
    Copy the full SHA
    4ac1aa5 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2016

  1. Added password reset attempts counter field

    Added field in database user table for counting number of attempts made to reset the their password with the current code.
    geozak committed Jan 9, 2016
    Configuration menu
    Copy the full SHA
    ca3edb8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eaaafde View commit details
    Browse the repository at this point in the history
  3. Merge pull request #7 from geozak/master

    update database install file
    geozak committed Jan 9, 2016
    Configuration menu
    Copy the full SHA
    e81d000 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2016

  1. Remove DB changes

    Removing DB from this branch so that it is in a completed state.
    geozak committed Jan 16, 2016
    Configuration menu
    Copy the full SHA
    6fa779d View commit details
    Browse the repository at this point in the history