Opened 3 years ago

Closed 3 years ago

#559 closed defect (fixed)

SECORE to reject queries with almost valid code

Reported by: pcampalani Owned by: pcampalani
Priority: critical Milestone: 9.0
Component: secore Version: development
Keywords: similar code Cc: dmisev
Complexity: Medium


SECORE does not throw exception when a code is almost right, that is when [[ EXISTING_CODE == GIVEN_CODE* ]].

For instance, the following CRS is (correctly) not resolved:


Whereas these are resolved with the GML content of EXISTING_CODE, and the gml:identifier of the GIVEN_CODE:


NOTE: Add systemtests after fixing the bug.

Change History (7)

comment:1 Changed 3 years ago by dmisev

Oh yes, the problem is the XQuery query matches with contains(), fix should be to simply add

id += "<";

on line 132 of source:applications/secore/secore-core/src/java/secore/handler/

comment:2 Changed 3 years ago by dmisev

Won't work though if in the definition then we have something like


instead of


not sure if the first is allowed though, it adds new lines in the identifier?

comment:3 Changed 3 years ago by pcampalani

I'm not sure that is legal.
Adding a .trim() in Java might anyway solve the issue?

comment:4 Changed 3 years ago by dmisev

No, the id match is done in an XQuery, see line 138 in source:applications/secore/secore-core/src/java/secore/handler/

comment:5 Changed 3 years ago by dmisev

Patch submitted.

comment:6 Changed 3 years ago by abeccati

Just a note: it's better to add systemtest *before* fixing so you have the failing test as proof of fix (not test driven development but close to) ;)
Looks like closeable

comment:7 Changed 3 years ago by dmisev

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.