1. Peter Sagerson
  2. django-otp

Commits

Peter Sagerson  committed 8b958be

Fix exceptions that can be triggered by empty forms.

Also skip otp_agents tests under Django < 1.4.

  • Participants
  • Parent commits ff4125d
  • Branches default

Comments (0)

Files changed (14)

File django-otp-agents/CHANGES

View file
 .. vim: ft=rst nospell tw=80
 
 
+v0.1.1 - October 8, 2012 - Django < 1.4
+---------------------------------------
+
+As a convenience, all unit tests are skipped in Django < 1.4.
+
+
 v0.1.0 - August 20, 2012 - Initial Release
 ------------------------------------------
 

File django-otp-agents/docs/source/conf.py

View file
 # The short X.Y version.
 version = '0.1'
 # The full version, including alpha/beta/rc tags.
-release = '0.1.0'
+release = '0.1.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

File django-otp-agents/otp_agents/tests/__init__.py

View file
+from unittest import skipIf
+
+import django
 from django.contrib.auth.models import User
-
 from django.test import TestCase
 
 
+@skipIf(django.VERSION < (1,4), 'Requires Django 1.4')
 class OTPAgentsTestCase(TestCase):
     fixtures = ['test/alice.yaml']
     urls = 'otp_agents.tests.urls'

File django-otp-agents/setup.py

View file
 
 setup(
     name='django-otp-agents',
-    version='0.1.0',
+    version='0.1.1',
     description="Integration of django-otp and django-agent-trust.",
     long_description=open('README').read(),
     author='Peter Sagerson',

File django-otp-twilio/CHANGES

View file
+.. vim: ft=rst nospell tw=80
+
+
+v0.1.1 - October 8, 2012 - Bug fix
+----------------------------------
+
+- Fix exception with an empty token form.
+
+
+v0.1.0 - August 20, 2012 - Initial Release
+------------------------------------------
+
+Initial release.

File django-otp-twilio/docs/source/conf.py

View file
 # The short X.Y version.
 version = '0.1'
 # The full version, including alpha/beta/rc tags.
-release = '0.1.0'
+release = '0.1.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

File django-otp-twilio/otp_twilio/models.py

View file
     def verify_token(self, token):
         try:
             token = int(token)
-        except ValueError:
+        except StandardError:
             return False
         else:
             return any(totp(self.bin_key, drift=drift) == token for drift in [0, -1])

File django-otp-twilio/setup.py

View file
 
 setup(
     name='django-otp-twilio',
-    version='0.1.0',
+    version='0.1.1',
     description="A django-otp plugin that delivers tokens via Twilio's SMS service.",
     long_description=open('README').read(),
     author='Peter Sagerson',

File django-otp/CHANGES

View file
 .. vim: ft=rst nospell tw=80
 
+
+v0.1.2 - October 8, 2012 - Bug fix
+----------------------------------
+
+- Fix an exception when an empty login form is submitted.
+
+
 v0.1.0 - August 20, 2012 - Initial Release
 ------------------------------------------
 

File django-otp/django_otp/plugins/otp_email/models.py

View file
     def verify_token(self, token):
         try:
             token = int(token)
-        except ValueError:
+        except StandardError:
             verified = False
         else:
             verified = any(totp(self.bin_key, drift=drift) == token for drift in [0, -1])

File django-otp/django_otp/plugins/otp_hotp/models.py

View file
     def verify_token(self, token):
         try:
             token = int(token)
-        except ValueError:
+        except StandardError:
             verified = False
         else:
             key = self.bin_key

File django-otp/django_otp/plugins/otp_totp/models.py

View file
     def verify_token(self, token):
         try:
             token = int(token)
-        except ValueError:
+        except StandardError:
             verified = False
         else:
             key = self.bin_key

File django-otp/docs/source/conf.py

View file
 # The short X.Y version.
 version = '0.1'
 # The full version, including alpha/beta/rc tags.
-release = '0.1.1'
+release = '0.1.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

File django-otp/setup.py

View file
 
 setup(
     name='django-otp',
-    version='0.1.1',
+    version='0.1.2',
     description='A pluggable framework for adding two-factor authentication to Django using one-time passwords.',
     long_description=open('README').read(),
     author='Peter Sagerson',