Commits

yorinasub17 committed 3313f00

Return False instead of raising False for codes out of range

Comments (0)

Files changed (2)

twostepauth/forms.py

                 raise forms.ValidationError(message)
         self.check_for_test_cookie()
         
-        return self.cleaned_data
+        return self.cleaned_data

twostepauth/models.py

             return False
         if code < 0 or code >= 1000000:
             # All time based verification codes are no longer than six digits.
-            raise False
+            return False
         # Compute verification codes and compare them with user input
         tm = int(now() / twostepauth_settings.TWOSTEPAUTH_TIME_STEP_SIZE)