diff options
Diffstat (limited to 'fbin.py')
-rwxr-xr-x | fbin.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -85,7 +85,7 @@ class Application(object): finally: session.close() - digest = hashlib.md5(str(uid) + user.password).hexdigest() + digest = hashlib.sha1(str(uid) + user.password).hexdigest() return user if (digest == identifier) else None def file(self, environ, start_response, path): @@ -143,7 +143,7 @@ class Application(object): })) username = form.getvalue('username') - password = hashlib.md5(form.getvalue('password')).hexdigest() + password = hashlib.sha1(form.getvalue('password')).hexdigest() user = self.get_user(username, password) @@ -156,7 +156,7 @@ class Application(object): c = Cookie.SimpleCookie() c['uid'] = user.id - c['identifier'] = hashlib.md5(str(user.id) + password).hexdigest() + c['identifier'] = hashlib.sha1(str(user.id) + password).hexdigest() dt = datetime.datetime.utcnow() + datetime.timedelta(days = 30) expires = dt.strftime('%a, %d-%b-%y %H:%M:%S GMT') @@ -187,7 +187,7 @@ class Application(object): 'error': 'Passwords doesn\'t match', })) - user = self.add_user(username, hashlib.md5(password).hexdigest()) + user = self.add_user(username, hashlib.sha1(password).hexdigest()) if not user: start_response('200 OK', [('Content-Type', 'text/html')]) return str(templates.register(searchList = { |