0

I have encountered a strange behavior of MarkLogic script evaluation (through qconsole or REST API) when trying to invoke ServerSide JavaScript functions. I was manipulating a JavaScript object that had a string property with text which includes that:

") -- or "

e.g. try to evaluate this script in qconsole:

fn.contains("text"," ) -- or ");

You can add any prefix and suffix to the second parameter, it always fail with 'Connection was reset' information, no matter how I invoke it, in qconsole or by REST API enter image description here

Can it be some sort of 'code injection' that breaks some internals? After that invocation I even could not find any entries in MarkLogic log regarding my calls.

MarkLogic Version: 10.0-9

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
  • 1
    `fn.contains("text"," ) -- or ");` runs fine for me in Query Console on 10.0-9.1 and 10.0-9.4 – Mads Hansen Sep 19 '22 at 12:02
  • Take a look at the ErrorLog.txt around that time and see if there are any errors (especially segmentation fault) or if you see it reported that MarkLogic is (re)starting "Starting MarkLogic" when you execute and are seeing the "Connection was reset" issue in Query Console. – Mads Hansen Sep 19 '22 at 12:16
  • 1
    @MadsHansen, I was searching for any suspicious log entries or anything that could be related to my errors but did not find anything. – CraneSenior Sep 19 '22 at 13:25
  • @MadsHansen, I have to test it more in depth, I will try to use docker to simulate my environment as much as it is possible and then try to recreate the problem – CraneSenior Sep 19 '22 at 17:59

0 Answers0