dabo Commit
Revision 5522
Date: 2009-11-14 10:31:12 -0800 (Sat, 14 Nov 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5522
Changed:
U trunk/dabo/lib/SimpleCrypt.py
Log:
Shortened the warning for SimpleCrypt - it was making doing any testing
impossible as the output clogged up the terminal. The new warning directs them
to the wiki, where I've created a page that we can add to with more information
about alternatives to SimpleCrypt.
The next step would be to provide the user with the ability to acknowledge this
fact and turn off the output.
Diff:
Modified: trunk/dabo/lib/SimpleCrypt.py
===================================================================
--- trunk/dabo/lib/SimpleCrypt.py 2009-11-14 16:18:42 UTC (rev 5521)
+++ trunk/dabo/lib/SimpleCrypt.py 2009-11-14 18:31:12 UTC (rev 5522)
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import random
+import warnings
class SimpleCrypt(object):
""" Provides basic encryption for Dabo. Perhaps a better term would
@@ -19,18 +20,9 @@
"""
def showWarning(self):
- import warnings
- warnings.warn("""
-WARNING:
-Your application uses SimpleCrypt, which is fine for testing but should
-not be used in production, because:
+ warnings.warn("WARNING: SimpleCrypt is not secure. Please see
http://wiki.dabodev.com/SimpleCrypt for more information")
-1) Anyone with a copy of Dabo could decrypt your password.
-2) It isn't portable between 32-bit and 64-bit python. See the trac
- ticket at http://trac.dabodev.com/ticket/1179 for more information.
-""", UserWarning)
-
def encrypt(self, aString):
self.showWarning()
tmpKey = self.generateKey(aString)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]