Language: Python
Label: vulnerable
CWE: CWE-285 \u2014 Improper Authorization
The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.

Code:
    def get_throttles(self):

        throttles = super().get_throttles()
        if self.action == "reset_password":
            throttles.append(PasswordResetRequestThrottle())
        
        return throttles