fixed compatibility issues in CRYPT

This commit is contained in:
mdipierro
2012-08-09 23:09:51 -05:00
parent 1906817df8
commit 92925f447b
4 changed files with 11 additions and 4 deletions

View File

@@ -1 +1 @@
Version 2.00.0 (2012-08-09 08:57:54) dev
Version 2.00.0 (2012-08-09 23:09:46) dev

View File

@@ -248,8 +248,11 @@ def sort_tables(tables):
def append(table,trail=[]):
if table in trail:
raise RuntimeError
for t in d[table]: append(t,trail=trail+[table])
if not table in tables: tables.append(table)
for t in d[table]:
# if not t==table: (problem, no dropdown for self references)
append(t,trail=trail+[table])
if not table in tables:
tables.append(table)
for table in d: append(table)
return tables

View File

@@ -45,6 +45,10 @@
response.files.append(URL('static','css/web2py.css'))
response.files.append(URL('static','css/bootswatch.css'))
}}
<!-- Makes bootswatch working on IE 7/8 -->
<!--[if (lt IE 9)]>
<link rel="stylesheet" href="{{=URL('static','css/bootswatch_ie.css')}}">
<![endif]-->
{{include 'web2py_ajax.html'}}

View File

@@ -44,7 +44,7 @@ def simple_hash(text, key='', salt = '', digest_alg = 'md5'):
raise RuntimeError, "simple_hash with digest_alg=None"
elif not isinstance(digest_alg,str):
h = digest_alg(text+key+salt)
elif key+salt: # backward compatile
elif key: # backward compatile
return hmac_hash(text, key+salt, digest_alg)
else: # compatible with third party systems
h = hashlib.new(digest_alg)