oracledb 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/build/Release/oracledb-7.0.1-darwin-arm64.node +0 -0
- package/build/Release/oracledb-7.0.1-darwin-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.1-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.1-linux-arm64.node +0 -0
- package/build/Release/oracledb-7.0.1-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.1-linux-x64.node +0 -0
- package/build/Release/oracledb-7.0.1-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.1-win32-x64.node +0 -0
- package/build/Release/oracledb-7.0.1-win32-x64.node-buildinfo.txt +1 -0
- package/lib/aqDeqOptions.js +4 -4
- package/lib/aqEnqOptions.js +2 -2
- package/lib/aqQueue.js +11 -6
- package/lib/connection.js +2 -10
- package/lib/endUserSecurityContext.js +12 -19
- package/lib/errors.js +22 -0
- package/lib/impl/parserHelpers.js +6 -2
- package/lib/thin/connection.js +0 -6
- package/lib/thin/dbObject.js +3 -3
- package/lib/thin/pool.js +1 -1
- package/lib/thin/protocol/messages/aqArray.js +2 -2
- package/lib/thin/protocol/messages/aqBase.js +2 -2
- package/lib/thin/protocol/messages/base.js +1 -1
- package/lib/thin/protocol/messages/withData.js +2 -3
- package/lib/thin/sqlnet/ezConnectResolver.js +2 -2
- package/lib/thin/sqlnet/navNodes.js +4 -2
- package/lib/thin/sqlnet/networkSession.js +17 -11
- package/lib/thin/sqlnet/packet.js +24 -4
- package/lib/thin/sqlnet/sessionAtts.js +2 -2
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/build/Release/oracledb-7.0.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-7.0.0-darwin-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.0-js-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-7.0.0-linux-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.0-linux-x64.node +0 -0
- package/build/Release/oracledb-7.0.0-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.0-win32-x64.node +0 -0
- package/build/Release/oracledb-7.0.0-win32-x64.node-buildinfo.txt +0 -1
- package/eslint.config.js +0 -39
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# node-oracledb version 7.0.
|
|
1
|
+
# node-oracledb version 7.0.1 <img src="https://img.shields.io/npm/v/oracledb.svg" alt="oracledb"/> <img src="https://img.shields.io/npm/dm/oracledb.svg" alt="oracledb"/>
|
|
2
2
|
|
|
3
3
|
The node-oracledb add-on for Node.js powers high performance Oracle Database
|
|
4
4
|
applications. Applications can be written in TypeScript, or directly in
|
|
5
5
|
JavaScript.
|
|
6
6
|
|
|
7
|
-
Use node-oracledb 7.0.
|
|
7
|
+
Use node-oracledb 7.0.1 to connect Node.js 14.17, or later, to Oracle
|
|
8
8
|
Database. Older versions of node-oracledb may work with older versions of
|
|
9
9
|
Node.js.
|
|
10
10
|
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-7.0.1-darwin-arm64.node v24.11.1 6a91ac655ae2460fb19c2227f62d85e02b98cd54 a8d9752420b96d37d5a76c8a5d371abdb95c6cba Thu, 09 Jul 2026 10:04:02 GMT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6a91ac655ae2460fb19c2227f62d85e02b98cd54
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-7.0.1-linux-arm64.node v22.22.2 6a91ac655ae2460fb19c2227f62d85e02b98cd54 a8d9752420b96d37d5a76c8a5d371abdb95c6cba Thu, 09 Jul 2026 12:01:11 GMT
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-7.0.1-linux-x64.node v22.19.0 6a91ac655ae2460fb19c2227f62d85e02b98cd54 a8d9752420b96d37d5a76c8a5d371abdb95c6cba Thu, 09 Jul 2026 11:59:00 GMT
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-7.0.1-win32-x64.node v22.17.1 6a91ac655ae2460fb19c2227f62d85e02b98cd54 a8d9752420b96d37d5a76c8a5d371abdb95c6cba Thu, 09 Jul 2026 11:58:36 GMT
|
package/lib/aqDeqOptions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2019,
|
|
1
|
+
// Copyright (c) 2019, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -56,7 +56,7 @@ class AqDeqOptions {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
set consumerName(value) {
|
|
59
|
-
errors.
|
|
59
|
+
errors.assertPropLength(value, "string", 128, "consumerName");
|
|
60
60
|
this._impl.setConsumerName(value);
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -70,7 +70,7 @@ class AqDeqOptions {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
set correlation(value) {
|
|
73
|
-
errors.
|
|
73
|
+
errors.assertPropLength(value, "string", 128, "correlation");
|
|
74
74
|
this._impl.setCorrelation(value);
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -148,7 +148,7 @@ class AqDeqOptions {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
set transformation(value) {
|
|
151
|
-
errors.
|
|
151
|
+
errors.assertPropLength(value, "string", 128, "transformation");
|
|
152
152
|
this._impl.setTransformation(value);
|
|
153
153
|
}
|
|
154
154
|
|
package/lib/aqEnqOptions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2019,
|
|
1
|
+
// Copyright (c) 2019, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -57,7 +57,7 @@ class AqEnqOptions {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
set transformation(value) {
|
|
60
|
-
errors.
|
|
60
|
+
errors.assertPropLength(value, "string", 128, "transformation");
|
|
61
61
|
this._impl.setTransformation(value);
|
|
62
62
|
}
|
|
63
63
|
|
package/lib/aqQueue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2019,
|
|
1
|
+
// Copyright (c) 2019, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -104,15 +104,15 @@ class AqQueue {
|
|
|
104
104
|
|
|
105
105
|
// validate options, if applicable
|
|
106
106
|
if (message.correlation !== undefined) {
|
|
107
|
-
errors.
|
|
107
|
+
errors.assertPropLength(message.correlation, "string", 128,
|
|
108
108
|
"correlation");
|
|
109
109
|
}
|
|
110
110
|
if (message.delay !== undefined) {
|
|
111
111
|
errors.assertParamPropValue(Number.isInteger(message.delay), 1, "delay");
|
|
112
112
|
}
|
|
113
113
|
if (message.exceptionQueue !== undefined) {
|
|
114
|
-
errors.
|
|
115
|
-
|
|
114
|
+
errors.assertPropLength(message.exceptionQueue, "string", 128,
|
|
115
|
+
"exceptionQueue");
|
|
116
116
|
}
|
|
117
117
|
if (message.expiration !== undefined) {
|
|
118
118
|
errors.assertParamPropValue(Number.isInteger(message.expiration), 1,
|
|
@@ -123,8 +123,13 @@ class AqQueue {
|
|
|
123
123
|
"priority");
|
|
124
124
|
}
|
|
125
125
|
if (message.recipients !== undefined) {
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
// Check recipients length and type
|
|
127
|
+
errors.assertPropLength(message.recipients, "array", 1024, "recipients");
|
|
128
|
+
// Check value and length of each recipient
|
|
129
|
+
message.recipients.forEach((recipient, index) => {
|
|
130
|
+
errors.assertPropLength(recipient, "string", 128,
|
|
131
|
+
`recipient at index ${index}`);
|
|
132
|
+
});
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
return message;
|
package/lib/connection.js
CHANGED
|
@@ -83,9 +83,8 @@ function _determineDbObjTypeConverter(metadata, options) {
|
|
|
83
83
|
}
|
|
84
84
|
if ([types.DB_TYPE_CLOB, types.DB_TYPE_NCLOB, types.DB_TYPE_BLOB,
|
|
85
85
|
types.DB_TYPE_BFILE].includes(metadata.type)) {
|
|
86
|
-
// converters for
|
|
87
|
-
return errors.
|
|
88
|
-
'DbObjConverter for LOBs');
|
|
86
|
+
// converters for LOBs are not supported.
|
|
87
|
+
return errors.throwNotImplemented('DbObjConverter for LOBs');
|
|
89
88
|
}
|
|
90
89
|
metadata.converter = result.converter;
|
|
91
90
|
}
|
|
@@ -2116,13 +2115,6 @@ class Connection extends EventEmitter {
|
|
|
2116
2115
|
errors.throwErr(errors.ERR_APP_CONTEXT_EMPTY_NAMESPACE);
|
|
2117
2116
|
}
|
|
2118
2117
|
|
|
2119
|
-
// Passing null/undefined/[] currently leaves existing entries intact in
|
|
2120
|
-
// thick mode and triggers an error in thin mode.
|
|
2121
|
-
// It does not clear the context; use clearAppContext() explicitly
|
|
2122
|
-
// when you need to remove keys.
|
|
2123
|
-
if (keyValues === null || keyValues === undefined) {
|
|
2124
|
-
keyValues = [];
|
|
2125
|
-
}
|
|
2126
2118
|
errors.assertParamValue(Array.isArray(keyValues), 2);
|
|
2127
2119
|
|
|
2128
2120
|
for (const entry of keyValues) {
|
|
@@ -44,12 +44,11 @@ Represents the credential set an application associates with an end user.
|
|
|
44
44
|
|
|
45
45
|
Required properties
|
|
46
46
|
- databaseAccessToken: non-empty string accepted by the database driver.
|
|
47
|
-
- endUserToken or endUserName:
|
|
48
|
-
- key: required whenever endUserName is supplied; otherwise optional.
|
|
47
|
+
- endUserToken or endUserName: exactly one must be supplied as a string.
|
|
49
48
|
|
|
50
49
|
Optional properties
|
|
51
50
|
- key: look-up identifier the database maps to stored context attributes; may be
|
|
52
|
-
|
|
51
|
+
supplied only with endUserName.
|
|
53
52
|
- dataRoles: data roles enabled/disabled by the application logic, rather
|
|
54
53
|
than a database security policy.
|
|
55
54
|
- attributes: Attributes are contained in JSON objects conforming
|
|
@@ -72,29 +71,28 @@ class EndUserSecurityContext {
|
|
|
72
71
|
dataRoles,
|
|
73
72
|
attributes
|
|
74
73
|
} = options;
|
|
74
|
+
const hasEndUserToken = endUserToken !== undefined && endUserToken !== null;
|
|
75
|
+
const hasEndUserName = endUserName !== undefined && endUserName !== null;
|
|
76
|
+
const hasKey = key !== undefined && key !== null;
|
|
75
77
|
|
|
76
78
|
// The database access token is always required, and the end user must be
|
|
77
|
-
// identified either by token or by name.
|
|
79
|
+
// identified either by token or by name, but not both.
|
|
78
80
|
errors.assertParamValue(hasNonEmptyText(databaseAccessToken), 1);
|
|
79
81
|
errors.assertParamValue(
|
|
80
|
-
(
|
|
81
|
-
(
|
|
82
|
-
1
|
|
83
|
-
);
|
|
82
|
+
(hasEndUserToken && !hasEndUserName && !hasKey) ||
|
|
83
|
+
(!hasEndUserToken && hasEndUserName), 1);
|
|
84
84
|
|
|
85
85
|
// When supplied, token/name/key values must contain non-whitespace text.
|
|
86
|
-
if (
|
|
86
|
+
if (hasEndUserToken) {
|
|
87
87
|
errors.assertParamValue(hasNonEmptyText(endUserToken), 1);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
// end user context attributes.
|
|
92
|
-
if (endUserName !== undefined && endUserName !== null) {
|
|
90
|
+
if (hasEndUserName) {
|
|
93
91
|
errors.assertParamValue(hasNonEmptyText(endUserName), 1);
|
|
94
|
-
errors.assertParamValue(key !== undefined && key !== null, 1);
|
|
95
92
|
}
|
|
96
93
|
|
|
97
|
-
if (
|
|
94
|
+
if (hasKey) {
|
|
95
|
+
errors.assertParamValue(hasEndUserName, 1);
|
|
98
96
|
errors.assertParamValue(hasNonEmptyText(key), 1);
|
|
99
97
|
}
|
|
100
98
|
|
|
@@ -159,7 +157,6 @@ class EndUserSecurityContext {
|
|
|
159
157
|
payloadLength
|
|
160
158
|
);
|
|
161
159
|
}
|
|
162
|
-
this.clearEncodedPayload();
|
|
163
160
|
this._payloadStore.set(encodedPayload, { returnBuffer: true });
|
|
164
161
|
encodedPayload.fill(0);
|
|
165
162
|
}
|
|
@@ -167,10 +164,6 @@ class EndUserSecurityContext {
|
|
|
167
164
|
getDeobfuscatedValue() {
|
|
168
165
|
return this._payloadStore.get({ returnBuffer: true });
|
|
169
166
|
}
|
|
170
|
-
|
|
171
|
-
clearEncodedPayload() {
|
|
172
|
-
this._payloadStore.clear();
|
|
173
|
-
}
|
|
174
167
|
}
|
|
175
168
|
|
|
176
169
|
module.exports = EndUserSecurityContext;
|
package/lib/errors.js
CHANGED
|
@@ -198,6 +198,7 @@ const ERR_INVALID_END_USER_SECURITY_CONTEXT_LENGTH = 189;
|
|
|
198
198
|
const ERR_END_USER_SECURITY_CONTEXT_REQUIRES_TCPS = 190;
|
|
199
199
|
const ERR_UNSUPPORTED_DEEP_DATA_SECURITY_FEATURE = 191;
|
|
200
200
|
const ERR_CHAR_CS_NOT_SUPPORTED = 192;
|
|
201
|
+
const ERR_INVALID_PROPERTY_LENGTH = 193;
|
|
201
202
|
|
|
202
203
|
// Oracle Net layer errors start from 500
|
|
203
204
|
const ERR_CONNECTION_CLOSED = 500;
|
|
@@ -603,6 +604,8 @@ messages.set(ERR_UNSUPPORTED_DEEP_DATA_SECURITY_FEATURE, // NJS-191
|
|
|
603
604
|
'database version does not support the Oracle Deep Data Security feature');
|
|
604
605
|
messages.set(ERR_CHAR_CS_NOT_SUPPORTED, // NJS-192
|
|
605
606
|
'Character set id %d is not supported by node-oracledb in Thin mode');
|
|
607
|
+
messages.set(ERR_INVALID_PROPERTY_LENGTH, // NJS-193
|
|
608
|
+
'The length of the parameter %s exceeds the maximum allowed length of %d');
|
|
606
609
|
|
|
607
610
|
// Oracle Net layer errors
|
|
608
611
|
|
|
@@ -793,6 +796,21 @@ function assertParamValue(condition, parameterNum) {
|
|
|
793
796
|
assert(condition, ERR_INVALID_PARAMETER_VALUE, parameterNum);
|
|
794
797
|
}
|
|
795
798
|
|
|
799
|
+
//-----------------------------------------------------------------------------
|
|
800
|
+
// assertPropLength()
|
|
801
|
+
//
|
|
802
|
+
// Asserts that the property value is of specified type and doesn't exceed
|
|
803
|
+
// maximum specified length
|
|
804
|
+
//-----------------------------------------------------------------------------
|
|
805
|
+
function assertPropLength(value, propType, propMaxLength, propName) {
|
|
806
|
+
if (propType !== 'array')
|
|
807
|
+
assertPropValue(typeof value === propType, propName);
|
|
808
|
+
else
|
|
809
|
+
assertPropValue(Array.isArray(value), propName);
|
|
810
|
+
assert(value.length <= propMaxLength, ERR_INVALID_PROPERTY_LENGTH, propName,
|
|
811
|
+
propMaxLength);
|
|
812
|
+
}
|
|
813
|
+
|
|
796
814
|
//-----------------------------------------------------------------------------
|
|
797
815
|
// assertPropValue()
|
|
798
816
|
//
|
|
@@ -816,6 +834,9 @@ function getErr(errorNum) {
|
|
|
816
834
|
errorNum = ERR_INVALID_ERR_NUM;
|
|
817
835
|
baseText = messages.get(errorNum);
|
|
818
836
|
}
|
|
837
|
+
if (errorNum === ERR_INVALID_PACKET && args.length > 1) {
|
|
838
|
+
baseText += '. Cause: %s';
|
|
839
|
+
}
|
|
819
840
|
const errorNumStr = errorNum.toString().padStart(3, '0');
|
|
820
841
|
const code = `${ERR_PREFIX}-${errorNumStr}`;
|
|
821
842
|
args[0] = `${code}: ${baseText}`;
|
|
@@ -1117,6 +1138,7 @@ module.exports = {
|
|
|
1117
1138
|
assertParamPropUnsignedIntNonZero,
|
|
1118
1139
|
assertParamPropValue,
|
|
1119
1140
|
assertParamValue,
|
|
1141
|
+
assertPropLength,
|
|
1120
1142
|
assertPropValue,
|
|
1121
1143
|
getErr,
|
|
1122
1144
|
throwErr,
|
|
@@ -81,8 +81,8 @@ const CONNECT_OVERRIDES = [
|
|
|
81
81
|
|
|
82
82
|
// SECURITY parameters
|
|
83
83
|
{ opt: 'walletLocation', section: ['DESCRIPTION', 'SECURITY', 'MY_WALLET_DIRECTORY'] },
|
|
84
|
-
{ opt: '
|
|
85
|
-
{ opt: '
|
|
84
|
+
{ opt: 'sslServerCertDN', section: ['DESCRIPTION', 'SECURITY', 'SSL_SERVER_CERT_DN'] },
|
|
85
|
+
{ opt: 'sslServerDNMatch', section: ['DESCRIPTION', 'SECURITY', 'SSL_SERVER_DN_MATCH'] },
|
|
86
86
|
|
|
87
87
|
// ADDRESS parameters
|
|
88
88
|
{ opt: 'httpsProxy', section: ['DESCRIPTION', 'ADDRESS', 'HTTPS_PROXY'], perAddress: true },
|
|
@@ -297,6 +297,10 @@ async function applyConnectStringOverrides(options) {
|
|
|
297
297
|
if (raw === undefined) {
|
|
298
298
|
continue;
|
|
299
299
|
}
|
|
300
|
+
// Treat walletLocation=SYSTEM as "use system certs" -> do not inject into descriptor
|
|
301
|
+
if (def.opt === 'walletLocation' && typeof raw === 'string' && raw.trim().toUpperCase() === 'SYSTEM') {
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
300
304
|
const formatter = def.fmt || (v => v);
|
|
301
305
|
const value = formatter(raw);
|
|
302
306
|
configured.push({ def, value });
|
package/lib/thin/connection.js
CHANGED
|
@@ -1901,16 +1901,10 @@ class ThinConnectionImpl extends ConnectionImpl {
|
|
|
1901
1901
|
errors.throwErr(errors.ERR_UNSUPPORTED_DEEP_DATA_SECURITY_FEATURE);
|
|
1902
1902
|
}
|
|
1903
1903
|
|
|
1904
|
-
if (this.securityContext && this.securityContext !== context) {
|
|
1905
|
-
this.securityContext.clearEncodedPayload();
|
|
1906
|
-
}
|
|
1907
1904
|
this.securityContext = context;
|
|
1908
1905
|
}
|
|
1909
1906
|
|
|
1910
1907
|
clearEndUserSecurityContext() {
|
|
1911
|
-
if (this.securityContext) {
|
|
1912
|
-
this.securityContext.clearEncodedPayload();
|
|
1913
|
-
}
|
|
1914
1908
|
this.securityContext = null;
|
|
1915
1909
|
}
|
|
1916
1910
|
|
package/lib/thin/dbObject.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2023,
|
|
1
|
+
// Copyright (c) 2023, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -305,7 +305,7 @@ class ThinDbObjectImpl extends DbObjectImpl {
|
|
|
305
305
|
}
|
|
306
306
|
break;
|
|
307
307
|
default:
|
|
308
|
-
errors.
|
|
308
|
+
errors.throwNotImplemented(type);
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
}
|
|
@@ -418,7 +418,7 @@ class ThinDbObjectImpl extends DbObjectImpl {
|
|
|
418
418
|
}
|
|
419
419
|
return obj;
|
|
420
420
|
default:
|
|
421
|
-
errors.
|
|
421
|
+
errors.throwNotImplemented(type);
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
|
package/lib/thin/pool.js
CHANGED
|
@@ -41,7 +41,7 @@ class ThinPoolImpl extends PoolImpl {
|
|
|
41
41
|
|
|
42
42
|
_init(params) {
|
|
43
43
|
if (!params.homogeneous) {
|
|
44
|
-
errors.
|
|
44
|
+
errors.throwNotImplemented('Heterogeneous Pooling');
|
|
45
45
|
}
|
|
46
46
|
if (!params.connectString) {
|
|
47
47
|
errors.throwErr(errors.ERR_EMPTY_CONNECT_STRING);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2025, Oracle and/or its affiliates.
|
|
1
|
+
// Copyright (c) 2025, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -78,7 +78,7 @@ class AqArrayMessage extends AqBaseMessage {
|
|
|
78
78
|
}
|
|
79
79
|
temp16 = buf.readUB2(); // extensions len
|
|
80
80
|
if (temp16 > 0) {
|
|
81
|
-
errors.
|
|
81
|
+
errors.throwNotImplemented('AQ extensions');
|
|
82
82
|
}
|
|
83
83
|
buf.skipUB2(); // output ack
|
|
84
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2025, Oracle and/or its affiliates.
|
|
1
|
+
// Copyright (c) 2025, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -134,7 +134,7 @@ class AqBaseMessage extends BaseMessage {
|
|
|
134
134
|
this._processExtensions(buf, propsImpl);
|
|
135
135
|
const temp32 = buf.readUB4(); // user properties
|
|
136
136
|
if (temp32 > 0) {
|
|
137
|
-
errors.
|
|
137
|
+
errors.throwNotImplemented('AQ User Properties');
|
|
138
138
|
}
|
|
139
139
|
buf.skipUB4(); // csn
|
|
140
140
|
buf.skipUB4(); // dsn
|
|
@@ -539,7 +539,7 @@ class Message {
|
|
|
539
539
|
if (
|
|
540
540
|
this.connection._actionModified ||
|
|
541
541
|
this.connection._clientIdentifierModified ||
|
|
542
|
-
this.connection.
|
|
542
|
+
this.connection._dbOpModified ||
|
|
543
543
|
this.connection._clientInfoModified ||
|
|
544
544
|
this.connection._moduleModified
|
|
545
545
|
) {
|
|
@@ -426,7 +426,6 @@ class MessageWithData extends Message {
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
processReturnParameter(buf) {
|
|
429
|
-
let keywordNum = 0;
|
|
430
429
|
let keyTextValue;
|
|
431
430
|
let numParams = buf.readUB2(); // al8o4l (ignored)
|
|
432
431
|
|
|
@@ -447,7 +446,7 @@ class MessageWithData extends Message {
|
|
|
447
446
|
if (numBytes > 0) {
|
|
448
447
|
buf.skipBytesChunked();
|
|
449
448
|
}
|
|
450
|
-
keywordNum = buf.readUB2();
|
|
449
|
+
const keywordNum = buf.readUB2(); // keyword num
|
|
451
450
|
if (keywordNum === constants.TNS_KEYWORD_NUM_CURRENT_SCHEMA) {
|
|
452
451
|
this.connection.currentSchema = keyTextValue;
|
|
453
452
|
} else if (keywordNum === constants.TNS_KEYWORD_NUM_EDITION) {
|
|
@@ -755,7 +754,7 @@ class MessageWithData extends Message {
|
|
|
755
754
|
buf.writeDbObject(value);
|
|
756
755
|
} else {
|
|
757
756
|
const message = `Binding data of type ${variable.type}`;
|
|
758
|
-
errors.
|
|
757
|
+
errors.throwNotImplemented(message);
|
|
759
758
|
}
|
|
760
759
|
}
|
|
761
760
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -295,7 +295,7 @@ class EZConnectResolver {
|
|
|
295
295
|
securityInfo.push(`(SSL_SERVER_DN_MATCH=${serverDNMatch})`);
|
|
296
296
|
if (serverCertDN != null)
|
|
297
297
|
securityInfo.push(`(SSL_SERVER_CERT_DN=${serverCertDN})`);
|
|
298
|
-
if (walletDir != null)
|
|
298
|
+
if (walletDir != null && walletDir.toUpperCase() !== 'SYSTEM')
|
|
299
299
|
securityInfo.push(`(MY_WALLET_DIRECTORY=${walletDir})`);
|
|
300
300
|
}
|
|
301
301
|
if (securityInfo.length === 0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -326,7 +326,9 @@ class Description {
|
|
|
326
326
|
|| tmpnv.atom.toLowerCase() == "on"
|
|
327
327
|
|| tmpnv.atom.toLowerCase() == "true");
|
|
328
328
|
} else if ((tmpnv.name.toUpperCase() == "WALLET_LOCATION") || (tmpnv.name.toUpperCase() == "MY_WALLET_DIRECTORY")) {
|
|
329
|
-
|
|
329
|
+
if (!(typeof tmpnv.atom === 'string' && tmpnv.atom.trim().toUpperCase() === 'SYSTEM')) {
|
|
330
|
+
this.params.walletLocation = tmpnv.atom;
|
|
331
|
+
}
|
|
330
332
|
}
|
|
331
333
|
}
|
|
332
334
|
}
|
|
@@ -157,14 +157,23 @@ class NetworkSession {
|
|
|
157
157
|
* Make the transport level connection
|
|
158
158
|
*/
|
|
159
159
|
async transportConnect(address) {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
const protocol = address?.protocol ? address.protocol.toUpperCase() : undefined;
|
|
161
|
+
const effectiveHttpsProxy = address?.httpsProxy || this.sAtts?.nt?.httpsProxy;
|
|
162
|
+
|
|
163
|
+
// Enforce TCPS whenever an HTTPS proxy would be used (either at the address
|
|
164
|
+
// level or via the session-global proxy fallback in NTTCP).
|
|
165
|
+
if (protocol === 'TCP' && effectiveHttpsProxy) {
|
|
166
|
+
errors.throwErr(errors.ERR_INVALID_CONNECT_STRING_PARAMETERS,
|
|
167
|
+
'https proxy requires protocol as', 'tcps ');
|
|
162
168
|
}
|
|
163
|
-
|
|
169
|
+
|
|
170
|
+
if (protocol === 'TCP' || protocol === 'TCPS') {
|
|
164
171
|
this.ntAdapter = new NTTCP(this.sAtts.nt);
|
|
165
172
|
} else {
|
|
166
|
-
errors.throwErr(errors.ERR_INVALID_CONNECT_STRING_PARAMETERS,
|
|
173
|
+
errors.throwErr(errors.ERR_INVALID_CONNECT_STRING_PARAMETERS,
|
|
174
|
+
address.protocol + " protocol not supported");
|
|
167
175
|
}
|
|
176
|
+
|
|
168
177
|
await this.ntAdapter.connect(address);
|
|
169
178
|
this.ntAdapter.startRead();
|
|
170
179
|
this.sAtts.ntCha = this.ntAdapter.cha;
|
|
@@ -390,7 +399,7 @@ class NetworkSession {
|
|
|
390
399
|
} catch (err) {
|
|
391
400
|
if (err.code == 'ERR_BUFFER_TOO_LARGE') {
|
|
392
401
|
errors.throwErr(errors.ERR_INVALID_PACKET,
|
|
393
|
-
|
|
402
|
+
`Decompressed packet exceeds SDU ${maxPayload}`);
|
|
394
403
|
}
|
|
395
404
|
errors.throwErr(errors.ERR_DATA_COMPRESSION, err.message);
|
|
396
405
|
}
|
|
@@ -580,7 +589,7 @@ class NetworkSession {
|
|
|
580
589
|
if (this.isBreak) {
|
|
581
590
|
return;
|
|
582
591
|
}
|
|
583
|
-
let bytesCopied
|
|
592
|
+
let bytesCopied;
|
|
584
593
|
|
|
585
594
|
this.sndDatapkt.dataLen = this.sndDatapkt.offset;
|
|
586
595
|
if (this.sndDatapkt.dataLen < this.sndDatapkt.bufLen || !this.sndDatapkt.bufLen) {
|
|
@@ -724,10 +733,8 @@ class NetworkSession {
|
|
|
724
733
|
* returns 0 if healthy connection
|
|
725
734
|
*/
|
|
726
735
|
recvInbandNotif() {
|
|
727
|
-
let error = 0;
|
|
728
736
|
if (this.controlPkt.errno) { /* Control pkt already read */
|
|
729
|
-
|
|
730
|
-
return (error);
|
|
737
|
+
return this.controlPkt.errno;
|
|
731
738
|
} else if (!this.getOption(constants.HEALTHCHECK)) {
|
|
732
739
|
return errors.ERR_CONNECTION_CLOSED;
|
|
733
740
|
} else {
|
|
@@ -736,8 +743,7 @@ class NetworkSession {
|
|
|
736
743
|
|
|
737
744
|
if (packet.type == constants.NSPTCNL) {
|
|
738
745
|
this.controlPkt.fromPacket(packet);
|
|
739
|
-
|
|
740
|
-
return (error);
|
|
746
|
+
return this.controlPkt.errno;
|
|
741
747
|
} else {
|
|
742
748
|
this.ntAdapter.packets.unshift(packet); /* Push packet back */
|
|
743
749
|
return (0);
|
|
@@ -32,6 +32,20 @@ const errors = require("../../errors.js");
|
|
|
32
32
|
const MAX_CDATA_LEN = 230;
|
|
33
33
|
const NSPCNL = 74;
|
|
34
34
|
|
|
35
|
+
|
|
36
|
+
function validateAcceptDataUnits(sdu, tdu, largeSDU) {
|
|
37
|
+
const maxSdu = largeSDU ? constants.NSPABSSDULN : constants.NSPMXSDULN;
|
|
38
|
+
if (sdu < constants.NSPMNSDULN || sdu > maxSdu) {
|
|
39
|
+
const reason = `Negotiated SDU ${sdu} is outside the valid range ` +
|
|
40
|
+
`${constants.NSPMNSDULN} to ${maxSdu}`;
|
|
41
|
+
errors.throwErr(errors.ERR_INVALID_PACKET, reason);
|
|
42
|
+
}
|
|
43
|
+
if (tdu < constants.NSPMNTDULN || tdu > constants.NSPMXTDULN) {
|
|
44
|
+
const reason = `Negotiated TDU ${tdu} is outside the valid range ` +
|
|
45
|
+
`${constants.NSPMNTDULN} to ${constants.NSPMXTDULN}`;
|
|
46
|
+
errors.throwErr(errors.ERR_INVALID_PACKET, reason);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
35
49
|
/**
|
|
36
50
|
* Connect Packet (NSPTCN)
|
|
37
51
|
* @param {Buffer} connectData Outgoing Connect Data
|
|
@@ -246,13 +260,16 @@ function AcceptPacket(packet, sAtts) {
|
|
|
246
260
|
/* Set negotiated values */
|
|
247
261
|
sAtts.version = packet.buf.readUInt16BE(constants.NSPACVSN);
|
|
248
262
|
sAtts.options = packet.buf.readUInt16BE(constants.NSPACOPT);
|
|
249
|
-
|
|
250
|
-
|
|
263
|
+
|
|
264
|
+
let negotiatedSDU = packet.buf.readUInt16BE(constants.NSPACSDU);
|
|
265
|
+
let negotiatedTDU = packet.buf.readUInt16BE(constants.NSPACTDU);
|
|
266
|
+
|
|
267
|
+
sAtts.largeSDU = false;
|
|
251
268
|
|
|
252
269
|
if (sAtts.version >= 315) {
|
|
253
270
|
/* Large SDU Support */
|
|
254
|
-
|
|
255
|
-
|
|
271
|
+
negotiatedSDU = packet.buf.readUInt32BE(constants.NSPACLSD);
|
|
272
|
+
negotiatedTDU = packet.buf.readUInt32BE(constants.NSPACLTD);
|
|
256
273
|
sAtts.largeSDU = true;
|
|
257
274
|
this.cflag = packet.buf.readUInt8(constants.NSPACCFL); // 00001000
|
|
258
275
|
if ((this.cflag & constants.NSPACCFON) != 0) { // compression ON
|
|
@@ -264,6 +281,9 @@ function AcceptPacket(packet, sAtts) {
|
|
|
264
281
|
sAtts.networkCompressionEnabled = false;
|
|
265
282
|
}
|
|
266
283
|
}
|
|
284
|
+
validateAcceptDataUnits(negotiatedSDU, negotiatedTDU, sAtts.largeSDU);
|
|
285
|
+
sAtts.sdu = negotiatedSDU;
|
|
286
|
+
sAtts.tdu = negotiatedTDU;
|
|
267
287
|
|
|
268
288
|
/* Accept flags */
|
|
269
289
|
this.flag0 = packet.buf.readUInt8(constants.NSPACFL0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2026, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -88,7 +88,7 @@ class SessionAtts {
|
|
|
88
88
|
this.networkCompressionThreshold = parseInt(params.networkCompressionThreshold);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
if (typeof params.walletLocation === 'string') {
|
|
91
|
+
if (typeof params.walletLocation === 'string' && params.walletLocation.trim().toUpperCase() !== 'SYSTEM') {
|
|
92
92
|
this.nt.walletFile = path.join(params.walletLocation, constants.PEM_WALLET_FILE_NAME);
|
|
93
93
|
}
|
|
94
94
|
if (typeof params.walletPassword === 'string') {
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-7.0.0-darwin-arm64.node v22.21.1 a0e6dd3908c245d3028bf517073d8a3cdd951289 e840c29ef17fa01d5eef018822af925154a5dd92 Fri, 15 May 2026 13:04:26 GMT
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a0e6dd3908c245d3028bf517073d8a3cdd951289
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-7.0.0-linux-arm64.node v22.22.2 a0e6dd3908c245d3028bf517073d8a3cdd951289 e840c29ef17fa01d5eef018822af925154a5dd92 Fri, 15 May 2026 13:48:55 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-7.0.0-linux-x64.node v22.19.0 a0e6dd3908c245d3028bf517073d8a3cdd951289 e840c29ef17fa01d5eef018822af925154a5dd92 Fri, 15 May 2026 13:45:53 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-7.0.0-win32-x64.node v22.17.1 a0e6dd3908c245d3028bf517073d8a3cdd951289 e840c29ef17fa01d5eef018822af925154a5dd92 Fri, 15 May 2026 13:49:56 GMT
|
package/eslint.config.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/** @type {import('eslint').Linter.Config} */
|
|
2
|
-
const js = require('@eslint/js');
|
|
3
|
-
module.exports = [
|
|
4
|
-
js.configs.recommended,
|
|
5
|
-
{
|
|
6
|
-
languageOptions: {
|
|
7
|
-
ecmaVersion: 'latest',
|
|
8
|
-
sourceType: 'commonjs',
|
|
9
|
-
globals: {
|
|
10
|
-
...require('globals').node,
|
|
11
|
-
...require('globals').es2020,
|
|
12
|
-
...require('globals').es2024,
|
|
13
|
-
...require('globals').mocha
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
rules: {
|
|
17
|
-
'require-await': 'error',
|
|
18
|
-
'brace-style': 'error',
|
|
19
|
-
'computed-property-spacing': ['error', 'never'],
|
|
20
|
-
'comma-spacing': ['error', { before: false, after: true }],
|
|
21
|
-
'no-trailing-spaces': 'error',
|
|
22
|
-
'prefer-const': 'error',
|
|
23
|
-
'space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
|
|
24
|
-
'key-spacing': ['error', { mode: 'strict' }],
|
|
25
|
-
'space-in-parens': 'error',
|
|
26
|
-
'space-infix-ops': 'error',
|
|
27
|
-
'space-unary-ops': [2, { words: true, nonwords: false }],
|
|
28
|
-
'space-before-blocks': 'error',
|
|
29
|
-
'no-tabs': 'error',
|
|
30
|
-
'keyword-spacing': 'error',
|
|
31
|
-
'eol-last': 'error',
|
|
32
|
-
'indent': [2, 2, { SwitchCase: 1 }],
|
|
33
|
-
'quotes': [0, 'double'],
|
|
34
|
-
'linebreak-style': [2, 'unix'],
|
|
35
|
-
'semi': [2, 'always'],
|
|
36
|
-
'no-console': [0]
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
];
|