Skip to content

Commit

Permalink
Fix handshake manifest parsing of future bolt versions (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxAake authored Feb 12, 2025
1 parent d102ad3 commit 38851e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/bolt-connection/src/bolt/handshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { alloc } from '../channel'
import { newError } from 'neo4j-driver-core'

const BOLT_MAGIC_PREAMBLE = 0x6060b017
const AVAILABLE_BOLT_PROTOCOLS = [5.8, 5.7, 5.6, 5.4, 5.3, 5.2, 5.1, 5.0, 4.4, 4.3, 4.2, 3.0] // bolt protocols the client will accept, ordered by preference
const AVAILABLE_BOLT_PROTOCOLS = ['5.8', '5.7', '5.6', '5.4', '5.3', '5.2', '5.1', '5.0', '4.4', '4.3', '4.2', '3.0'] // bolt protocols the client will accept, ordered by preference
const DESIRED_CAPABILITES = 0

function version (major, minor) {
Expand Down Expand Up @@ -98,7 +98,7 @@ function handshakeNegotiationV2 (channel, buffer, log) {
})
for (let i = 0; i < versions.length; i++) {
const version = versions[i]
if (AVAILABLE_BOLT_PROTOCOLS.includes(Number(version.major + '.' + version.minor))) {
if (AVAILABLE_BOLT_PROTOCOLS.includes(version.major + '.' + version.minor)) {
major = version.major
minor = version.minor
break
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 38851e3

Please sign in to comment.