File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,20 @@ cdef class ConnectionCookie:
4242
4343cdef dict connection_cookies_by_uuid = {}
4444
45- cdef ConnectionCookie get_connection_cookie_by_uuid(bytes uuid):
45+ cdef ConnectionCookie get_connection_cookie_by_uuid(bytes uuid,
46+ Description description):
4647 """
4748 Returns a connection cookie given the UUID supplied in the accept packet.
4849 If no such cookie exists, a new one is created and returned for population.
4950 """
50- cdef ConnectionCookie cookie = connection_cookies_by_uuid.get(uuid)
51+ cdef:
52+ ConnectionCookie cookie
53+ str key_str
54+ bytes key
55+ key_str = description.service_name or description.sid or " "
56+ key = uuid + key_str.encode()
57+ cookie = connection_cookies_by_uuid.get(key)
5158 if cookie is None :
5259 cookie = ConnectionCookie.__new__ (ConnectionCookie)
53- connection_cookies_by_uuid[uuid ] = cookie
60+ connection_cookies_by_uuid[key ] = cookie
5461 return cookie
Original file line number Diff line number Diff line change @@ -1733,7 +1733,8 @@ cdef class ConnectMessage(Message):
17331733 if protocol_version >= TNS_VERSION_MIN_UUID:
17341734 buf.skip_raw_bytes(33 )
17351735 db_uuid = buf.read_raw_bytes(16 )[:16 ]
1736- self .cookie = get_connection_cookie_by_uuid(db_uuid)
1736+ self .cookie = get_connection_cookie_by_uuid(db_uuid,
1737+ self .description)
17371738 buf._caps._adjust_for_protocol(protocol_version, protocol_options)
17381739 elif self .packet_type == TNS_PACKET_TYPE_REFUSE:
17391740 response = self .error_info.message
You can’t perform that action at this time.
0 commit comments