Skip to content

Commit 9da22cd

Browse files
Fixed bug connecting to an IPv6 address with IAM tokens.
1 parent 2f2f7b3 commit 9da22cd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/src/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Thin Mode Changes
3333
#) Fixed bug with SQL containing multibyte characters with certain database
3434
character sets
3535
(`issue 133 <https://github.com/oracle/python-oracledb/issues/133>`__).
36+
#) Fixed bug connecting to an IPv6 address with IAM tokens.
3637
#) Implementation changes:
3738

3839
- Made the pool implementation LIFO to improve locality, reduce the number

src/oracledb/impl/thin/messages.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ cdef class AuthMessage(Message):
15921592
if self.private_key is not None:
15931593
date_format = "%a, %d %b %Y %H:%M:%S GMT"
15941594
now = datetime.datetime.utcnow().strftime(date_format)
1595-
host_info = "%s:%d" % buf._socket.getpeername()
1595+
host_info = "%s:%d" % buf._socket.getpeername()[:2]
15961596
header = f"date: {now}\n" + \
15971597
f"(request-target): {self.service_name}\n" + \
15981598
f"host: {host_info}"

0 commit comments

Comments
 (0)