Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sessionid = hashlib.md5(user.encode('utf')).hexdigest()
- #generates the session id for the cookie
- response = make_response(open('LoginPassed.xml').read())
- response.set_cookie('sessionid', sessionid)
- for name in request.cookies:
- #I am trying to get the value of a sessionid cookie to compare if that
- #hash matches with the hash value of the email sent
- value = request.cookies.get('sessionid')
- items = value.items
- for a, b in items:
- if b == hashlib.md5(_email.encode('utf')).hexdigest():
- response = make_response()
- response.headers['NewSession'] = 'new'
- return LoginPassed(name)
- return LoginError()
Add Comment
Please, Sign In to add comment