anyx / LoginGateBundle

59 stars 23 forks source link

Implement BruteForceAttemptException::getMessageKey() #14

Closed adeelnawaz closed 6 years ago

adeelnawaz commented 6 years ago

Expected Behavior

The method BruteForceAttemptException::getMessageKey() must not return the default AuthenticationException::getMessageKey() response. The response string must be uniquely identifyable as a brute force attack as well as should be presentable to user as it is.

Current Behavior

The method BruteForceAttemptException::getMessageKey() isn't implemented, hence such call falls back to the parent and AuthenticationException::getMessageKey() returns the default response string, 'An authentication exception occurred.'

Possible Solution

15

Add the following method to BruteForceAttemptException

/**
     * @return string
     */
    public function getMessageKey()
    {
        return 'Too many authentication failures';
    }
anyx commented 6 years ago

@adeelnawaz Thank you for issue. Can you create pull request for this?

adeelnawaz commented 6 years ago

Already done :) waiting for next release

anyx commented 6 years ago

Just released 0.7 version with this fix