Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Parse Error #978

Open
nakisen opened this issue Apr 23, 2024 · 0 comments
Open

Parse Error #978

nakisen opened this issue Apr 23, 2024 · 0 comments

Comments

@nakisen
Copy link

nakisen commented Apr 23, 2024

When unrecognized data arrives, the service throws an error.

[14:20:24.934] TRACE (264336): new connection from 185.122.204.179:60574
[14:20:24.935] TRACE (264336): data on 185.122.204.179:60574: <Buffer 03 00 00 2f 2a e0 00 00 00 00 00 43 6f 6f 6b 69 65 3a 20 6d 73 74 73 68 61 73 68 3d 41 64 6d 69 6e 69 73 74 72 0d 0a 01 00 08 00 03 00 00 00>

node:events:492
      throw er; // Unhandled 'error' event
      ^
VError: Parser error for 185.122.204.179:60574: Cannot read properties of null (reading 'toString')
    at Parser.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:460:26)
    at Parser.emit (node:events:514:28)
    at Parser.write (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/messages/parser.js:131:10)
    at Socket.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:475:19)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12)
    at readableAddChunk (node:internal/streams/readable:349:9)
    at Readable.push (node:internal/streams/readable:286:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on Server instance at:
    at Parser.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:460:12)
    at Parser.emit (node:events:514:28)
    [... lines matching original stack trace ...]
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  jse_shortmsg: 'Parser error for 185.122.204.179:60574',
  jse_cause: TypeError: Cannot read properties of null (reading 'toString')
      at BerReader.readTag (/opt/intouch/ldapsrv/node_modules/@ldapjs/asn1/lib/ber/reader.js:421:31)
      at BerReader.readInt (/opt/intouch/ldapsrv/node_modules/@ldapjs/asn1/lib/ber/reader.js:179:28)
      at parseToMessage (/opt/intouch/ldapsrv/node_modules/@ldapjs/messages/lib/parse-to-message.js:57:25)
      at LdapMessage.parse (/opt/intouch/ldapsrv/node_modules/@ldapjs/messages/lib/ldap-message.js:262:41)
      at Parser.write (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/messages/parser.js:117:38)
      at Socket.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:475:19)
      at Socket.emit (node:events:514:28)
      at addChunk (node:internal/streams/readable:376:12)
      at readableAddChunk (node:internal/streams/readable:349:9)
      at Readable.push (node:internal/streams/readable:286:10),
  jse_info: {},
  cause: [Function: ve_cause]
}

Node.js v20.9.0
[23:05:17.287] TRACE (273044): data on 95.70.185.40:5668: <Buffer 30 2e 02 01 08 63 29 04 11 64 63 3d 74 74 73 61 6e 61 6c 73 61 6e 74 72 61 6c 0a 01 02 0a 01 00 02 01 00 02 01 00 01 01 ff 30 05 04 03 31 2e 31>

node:events:492
      throw er; // Unhandled 'error' event
      ^
VError: Parser error for 95.70.185.40:5668: invalid search filter type: 0x30
    at Parser.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:460:26)
    at Parser.emit (node:events:514:28)
    at Parser.write (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/messages/parser.js:131:10)
    at Socket.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:475:19)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12)
    at readableAddChunk (node:internal/streams/readable:349:9)
    at Readable.push (node:internal/streams/readable:286:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on Server instance at:
    at Parser.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:460:12)
    at Parser.emit (node:events:514:28)
    [... lines matching original stack trace ...]
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  jse_shortmsg: 'Parser error for 95.70.185.40:5668',
  jse_cause: Error: invalid search filter type: 0x30
      at _parse (/opt/intouch/ldapsrv/node_modules/@ldapjs/filter/lib/ber-parsing/index.js:67:13)
      at Object.parseBer (/opt/intouch/ldapsrv/node_modules/@ldapjs/filter/lib/ber-parsing/index.js:33:10)
      at SearchRequest.parseToPojo (/opt/intouch/ldapsrv/node_modules/@ldapjs/messages/lib/messages/search-request.js:489:33)
      at parseToMessage (/opt/intouch/ldapsrv/node_modules/@ldapjs/messages/lib/parse-to-message.js:60:36)
      at LdapMessage.parse (/opt/intouch/ldapsrv/node_modules/@ldapjs/messages/lib/ldap-message.js:262:41)
      at Parser.write (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/messages/parser.js:117:38)
      at Socket.<anonymous> (/opt/intouch/ldapsrv/node_modules/ldapjs/lib/server.js:475:19)
      at Socket.emit (node:events:514:28)
      at addChunk (node:internal/streams/readable:376:12)
      at readableAddChunk (node:internal/streams/readable:349:9),
  jse_info: {},
  cause: [Function: ve_cause]
}

Node.js v20.9.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant