(request, sid)
return sid
Verify a User's Session

    This verifies the User's Session by verifying the SHA1 Hash
    of the User's IP Address and User-Agent match the provided
    Session ID.
Verify a User's Session
Verify a User s Session
def verify_session(request, sid):
    """Verify a User's Session

    This verifies the User's Session by verifying the SHA1 Hash
    of the User's IP Address and User-Agent match the provided
    Session ID.
    """

    if "/" not in sid:
        return create_session(request)

    user = sid.split("/", 1)[1]

    if user != who(request):
        return create_session(request)

    return sid
def verify_session ( request , sid ) : if "/" not in sid : return create_session ( request ) user = sid . split ( "/" , 1 ) [ 1 ] if user != who ( request ) : return create_session ( request ) return sid