On 11/7/24 04:53, David Eric Pugh wrote:
  Would you mind testing this in either 9.7 or main?  Make sure that we don't 
have a bug that needs fixing?

@David,

In case you haven't followed the thread: for some reason there is the 0x00 byte where Solr expects "no data or a JSON object" (quoting Jan); it's only in some configsets and we have no idea how it got there.

Whether it's a bug or not, and whose, it may be worth adding a check before passing the value to JSON parser: the "\0" is "no data"/empty string, at least in traditional C definition. The trace shows it trying to parse the string "\0" (both dots below are 00 in hex):

org.noggit.JSONParser$ParseException: JSON Parse Error: char=.,position=0 AFTER='.' BEFORE='' => org.noggit.JSONParser
$ParseException: JSON Parse Error: char=.,position=0 AFTER='.' BEFORE=''

That is passed from
org.apache.solr.handler.admin.ConfigSetsHandler.handleConfigUploadRequest(ConfigSetsHandler.java:205)
to
org.apache.solr.common.util.Utils.fromJSON(Utils.java:305)

It's probably a good idea to check if the string is zero-length somewhere between those two.

Dima

Reply via email to