Skip to content

Server crash with malformed query (FindEntity) #98

@isclayton

Description

@isclayton

Not sure if FindEntity is intended to support query by "type" property, but in any event, this crashes the server (Running docker container intellabs/vdms:latest)

To reproduce:

Send FindEntity query like:


"FindEntity" : {
         "class" : "Hike", 
         "constraints" : {
             "type" : [] 
         }

While this query has no type value, I think you can reproduce by providing values as well.
Error:

vdms: src/PMGDQuery.cc:339: void VDMS::PMGDQuery::parse_query_constraints(const Json::Value&, VDMS::PMGDQueryConstraints*): Assertion `predicate.size() == 2 || predicate.size() == 4' failed.

Looks like some additional validation is needed, but I haven't dug too deep into it.

Metadata

Metadata

Assignees

Labels

BugIndicates unexpected or undesired behaviors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions