Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Commit

Permalink
do aes encryption in m2crypto not mysql (bug 782746)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Oct 5, 2012
1 parent eeb8c87 commit 036be1a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
3 changes: 1 addition & 2 deletions lib/buyers/models.py
Expand Up @@ -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')
Expand Down
12 changes: 4 additions & 8 deletions lib/sellers/models.py
Expand Up @@ -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.

Expand Down Expand Up @@ -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):
Expand Down
5 changes: 5 additions & 0 deletions 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;
3 changes: 2 additions & 1 deletion requirements/prod.txt
Expand Up @@ -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
Expand Down

0 comments on commit 036be1a

Please sign in to comment.