fiware-orion icon indicating copy to clipboard operation
fiware-orion copied to clipboard

[BUG] in GET v2/entities using "q" query parameter, seconds and mSecs are not validated

Open iariasleon opened this issue 8 years ago • 4 comments

in GET v2/entities using "q" query parameter, seconds and mSecs are not validated. Before seconds (year, month, day, hour, minute) all are validate, but after minutes not.

cases that return 200 - OK

  • /v2/entities?q=my_time>=2016-04-05T14:10:00.00Z
  • /v2/entities?q=my_time>=2016-04-05T14:10:4XX.00Z
  • /v2/entities?q=my_time>=2016-04-05T14:10:00**;**00Z
  • /v2/entities?q=my_time>=2016-04-05T14:10:00.j00Z
  • /v2/entities?q=my_time>=2016-04-05T14:10:00.00N

case that return 400 - Bad Request

{
"error": "BadRequest"
"description": "invalid query expression"
}
  • year, month, day, hour, minute and their separators are validated
  • /v2/entities?q=my_time>=2016-04-05T14**;**10:00.00Z
  • /v2/entities?q=my_time>=2016-04-05T14:00:XX00.00Z

iariasleon avatar Apr 04 '16 14:04 iariasleon