Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32650f0cbf | ||
|
|
8f8ef4cca5 | ||
|
|
c9e92fc686 | ||
|
|
0820926b50 | ||
|
|
1856c9dc7a |
@@ -17,7 +17,7 @@
|
|||||||
- Updated feedparser.py 5.2.1
|
- Updated feedparser.py 5.2.1
|
||||||
- Updated jQuery 1.12.2
|
- Updated jQuery 1.12.2
|
||||||
- welcome app now checks for version number
|
- welcome app now checks for version number
|
||||||
- Redis improvements. The old syntax still works but we recommend moving to new syntax:
|
- Redis improvements. New syntax:
|
||||||
|
|
||||||
BEFORE:
|
BEFORE:
|
||||||
from gluon.contrib.redis_cache import RedisCache
|
from gluon.contrib.redis_cache import RedisCache
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ update:
|
|||||||
echo "remember that pymysql was tweaked"
|
echo "remember that pymysql was tweaked"
|
||||||
src:
|
src:
|
||||||
### Use semantic versioning
|
### Use semantic versioning
|
||||||
echo 'Version 2.14.1-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
echo 'Version 2.14.2-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
||||||
### rm -f all junk files
|
### rm -f all junk files
|
||||||
make clean
|
make clean
|
||||||
### clean up baisc apps
|
### clean up baisc apps
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Version 2.14.1-stable+timestamp.2016.03.24.12.19.17
|
Version 2.14.2-stable+timestamp.2016.03.24.17.44.22
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
session.connect(request,response,cookie_key='yoursecret')
|
from gluon.utils import web2py_uuid
|
||||||
|
cookie_key = cache.ram('cookie_key',lambda: web2py_uuid(),None)
|
||||||
|
session.connect(request,response,cookie_key=cookie_key)
|
||||||
|
|||||||
+2
-2
@@ -172,7 +172,7 @@ def secure_dumps(data, encryption_key, hash_key=None, compression_level=None):
|
|||||||
dump = pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
|
dump = pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
|
||||||
if compression_level:
|
if compression_level:
|
||||||
dump = zlib.compress(dump, compression_level)
|
dump = zlib.compress(dump, compression_level)
|
||||||
key = pad(encryption_key[:32])
|
key = pad(encryption_key)[:32]
|
||||||
cipher, IV = AES_new(key)
|
cipher, IV = AES_new(key)
|
||||||
encrypted_data = base64.urlsafe_b64encode(IV + cipher.encrypt(pad(dump)))
|
encrypted_data = base64.urlsafe_b64encode(IV + cipher.encrypt(pad(dump)))
|
||||||
signature = hmac.new(hash_key, encrypted_data).hexdigest()
|
signature = hmac.new(hash_key, encrypted_data).hexdigest()
|
||||||
@@ -188,7 +188,7 @@ def secure_loads(data, encryption_key, hash_key=None, compression_level=None):
|
|||||||
actual_signature = hmac.new(hash_key, encrypted_data).hexdigest()
|
actual_signature = hmac.new(hash_key, encrypted_data).hexdigest()
|
||||||
if not compare(signature, actual_signature):
|
if not compare(signature, actual_signature):
|
||||||
return None
|
return None
|
||||||
key = pad(encryption_key[:32])
|
key = pad(encryption_key)[:32]
|
||||||
encrypted_data = base64.urlsafe_b64decode(encrypted_data)
|
encrypted_data = base64.urlsafe_b64decode(encrypted_data)
|
||||||
IV, encrypted_data = encrypted_data[:16], encrypted_data[16:]
|
IV, encrypted_data = encrypted_data[:16], encrypted_data[16:]
|
||||||
cipher, _ = AES_new(key, IV=IV)
|
cipher, _ = AES_new(key, IV=IV)
|
||||||
|
|||||||
Reference in New Issue
Block a user