Skip to content

Commit e5062e9

Browse files
committed
Fixed segmentation fault issue when getting connection from the pool for external authentication
1 parent 76a1108 commit e5062e9

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ node-oracledb `v6.7.1 <https://github.com/oracle/node-oracledb/compare/v6.7.0...
1414
Common Changes
1515
++++++++++++++
1616

17+
#) Fixed the issue causing segmentation fault while getting connection from
18+
pool for external authentication.
19+
1720
#) Fixed SyntaxError with Bun runtime.
1821
See `Issue #1707 <https://github.com/oracle/node-oracledb/issues/1707>`__.
1922

src/njsModule.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,8 @@ struct njsPool {
578578
uint32_t stmtCacheSize;
579579
int32_t poolPingInterval;
580580
int32_t poolPingTimeout;
581-
bool sodaMetadataCache;
581+
bool sodaMetadataCache;
582+
bool externalAuth;
582583
njsTokenCallback *accessTokenCallback;
583584
dpiErrorInfo warningInfo;
584585
};

src/njsPool.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ static bool njsPool_createPostAsync(njsBaton *baton, napi_env env,
300300
baton->dpiPoolHandle = NULL;
301301

302302
// perform other initializations
303+
pool->externalAuth = baton->externalAuth;
303304
pool->poolMax = baton->poolMax;
304305
pool->poolMaxPerShard = baton->poolMaxPerShard;
305306
pool->poolMin = baton->poolMin;
@@ -399,6 +400,7 @@ static bool njsPool_getConnectionAsync(njsBaton *baton)
399400
params.connectionClassLength = (uint32_t) baton->connectionClassLength;
400401
params.tag = baton->tag;
401402
params.tagLength = (uint32_t) baton->tagLength;
403+
params.externalAuth = pool->externalAuth;
402404

403405
// Sharding
404406
params.shardingKeyColumns = baton->shardingKeyColumns;

0 commit comments

Comments
 (0)