File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -692,6 +692,11 @@ class ThinConnectionImpl extends ConnectionImpl {
692
692
fastAuthMessage . dataTypeMessage = dataTypeMessage ;
693
693
fastAuthMessage . authMessage = authMessage ;
694
694
await this . _protocol . _processMessage ( fastAuthMessage ) ;
695
+ if ( fastAuthMessage . reNegotiate ) {
696
+ // Fast Authentication failed.
697
+ await this . _protocol . _processMessage ( dataTypeMessage ) ;
698
+ await this . _protocol . _processMessage ( authMessage ) ;
699
+ }
695
700
} else {
696
701
await this . _protocol . _processMessage ( protocolMessage ) ;
697
702
await this . _protocol . _processMessage ( dataTypeMessage ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ const vector = require('../../impl/datahandlers/vector.js');
35
35
const errors = require ( "../../errors.js" ) ;
36
36
37
37
const TNS_BASE64_ALPHABET_ARRAY = Buffer . from ( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" , 'utf8' ) ;
38
+ const FAST_AUTH_END_OF_RPC_VALUE = 0x800 ;
39
+ const FAST_AUTH_END_OF_RPC_OFFSET = 0x8 ;
38
40
39
41
/**
40
42
* Class used for byte chunks used in the ChunkedBytesBuffer.
@@ -495,6 +497,10 @@ class WritePacket extends BaseBuffer {
495
497
if ( ! finalPacket ) {
496
498
buf = Buffer . from ( buf ) ;
497
499
this . startPacket ( ) ;
500
+ } else {
501
+ // Write End of RPC bit in last packet used only for fastAuth Message.
502
+ this . buf . writeUInt16BE ( FAST_AUTH_END_OF_RPC_VALUE ,
503
+ FAST_AUTH_END_OF_RPC_OFFSET ) ;
498
504
}
499
505
if ( ! this . nsi . ntAdapter ) {
500
506
errors . throwErr ( errors . ERR_INVALID_CONNECTION ) ;
You can’t perform that action at this time.
0 commit comments