Browse files

do aes encryption in m2crypto not mysql (bug 782746)

  • Loading branch information...
1 parent eeb8c87 commit 036be1a185fc9d35cea9e05faff8da0907e5bed3 @andymckay andymckay committed Oct 5, 2012
Showing with 12 additions and 11 deletions.
  1. +1 −2 lib/buyers/models.py
  2. +4 −8 lib/sellers/models.py
  3. +5 −0 migrations/10-increase-columns.sql
  4. +2 −1 requirements/prod.txt
View
3 lib/buyers/models.py
@@ -13,8 +13,7 @@ class Meta(Model.Meta):
class BuyerPaypal(Model):
- key = AESField(max_length=255, blank=True, null=True,
- aes_key='buyerpaypal:key')
+ key = AESField(blank=True, null=True, aes_key='buyerpaypal:key')
expiry = models.DateField(blank=True, null=True)
currency = models.CharField(max_length=3, blank=True, null=True)
buyer = models.OneToOneField(Buyer, related_name='paypal')
View
12 lib/sellers/models.py
@@ -13,12 +13,9 @@ class Meta(Model.Meta):
class SellerPaypal(Model):
- paypal_id = AESField(max_length=255, blank=True, null=True,
- aes_key='sellerpaypal:id')
- token = AESField(max_length=255, blank=True, null=True,
- aes_key='sellerpaypal:token')
- secret = AESField(max_length=255, blank=True, null=True,
- aes_key='sellerpaypal:secret')
+ paypal_id = AESField(blank=True, null=True, aes_key='sellerpaypal:id')
+ token = AESField(blank=True, null=True, aes_key='sellerpaypal:token')
+ secret = AESField(blank=True, null=True, aes_key='sellerpaypal:secret')
seller = models.OneToOneField(Seller, related_name='paypal')
# TODO: currencies.
@@ -48,8 +45,7 @@ def token_exists(self):
class SellerBluevia(Model):
- bluevia_id = AESField(max_length=255, blank=True, null=True,
- aes_key='sellerbluevia:id')
+ bluevia_id = AESField(blank=True, null=True, aes_key='sellerbluevia:id')
seller = models.OneToOneField(Seller, related_name='bluevia')
class Meta(Model.Meta):
View
5 migrations/10-increase-columns.sql
@@ -0,0 +1,5 @@
+ALTER TABLE buyer_paypal MODIFY `key` longtext;
+ALTER TABLE seller_paypal MODIFY `token` longtext;
+ALTER TABLE seller_paypal MODIFY `paypal_id` longtext;
+ALTER TABLE seller_paypal MODIFY `secret` longtext;
+ALTER TABLE seller_bluevia MODIFY `bluevia_id` longtext;
View
3 requirements/prod.txt
@@ -3,13 +3,14 @@ PyJWT==0.1.4
cef==0.3
commonware==0.4.0
django-multidb-router
-django-mysql-aesfield==0.2.1
+django-aesfield==0.1
django-nose==1.1
django-statsd-mozilla==0.3.7
django-tastypie==0.9.11
funfactory==2.1.1
jingo==0.4
mimeparse==0.1.3
+m2secret==0.1.1
nose==1.2.1
python-dateutil==2.1
python-memcached==1.48

0 comments on commit 036be1a

Please sign in to comment.