Skip to content

Commit ff9f7c8

Browse files
committed
Return proper error when invalid service name is configured in the database listener
1 parent 3222ef3 commit ff9f7c8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Common Changes
2323
Thin Mode Changes
2424
+++++++++++++++++
2525

26+
#) Fixed Bug to return proper error when invalid service name is
27+
configured in listener.
28+
2629
#) Added support for an Oracle Database 23c feature that can improve the
2730
performance of connection creation by reducing the number of round trips
2831
required to create the second and subsequent connections to the same

lib/thin/protocol/messages/protocol.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ class ProtocolMessage extends Message {
7272
const fdo = buf.readBytes(fdoLen);
7373
const ix = 6 + fdo[5] + fdo[6];
7474
buf.caps.nCharsetId = (fdo[ix + 3] << 8) + fdo[ix + 4];
75-
this.serverCompileCaps = Buffer.from(buf.readBytesWithLength());
76-
if (this.serverCompileCaps) {
75+
const serverCompileCaps = buf.readBytesWithLength();
76+
if (serverCompileCaps) {
77+
this.serverCompileCaps = Buffer.from(serverCompileCaps);
7778
buf.caps.adjustForServerCompileCaps(this.serverCompileCaps);
7879
}
79-
this.serverRunTimeCaps = Buffer.from(buf.readBytesWithLength());
80-
if (this.serverRunTimeCaps) {
80+
const serverRunTimeCaps = buf.readBytesWithLength();
81+
if (serverRunTimeCaps) {
82+
this.serverRunTimeCaps = Buffer.from(serverRunTimeCaps);
8183
buf.caps.adjustForServerRuntimeCaps(this.serverRunTimeCaps);
8284
}
8385
}

0 commit comments

Comments
 (0)