[GeoNetwork-devel] UUID case handling bug in CSW transactions

GeoNetwork's (2.4) MEF import and CSW Insert transaction allow for upper and lower case UUID GUIDs (420f889f-70e3-4ff4-ab27-190563fb7f8e or 420F889F-70E3-4FF4-AB27-190563FB7F8E). Both GN's search interface and CSW GetRecordById transactions are case insensitive. However, GN's CSW Delete transaction implementation is not just case sensitive but is incapable of recognizing upper casing at all.

For example, a ISO 19139 metadata record with a <gmd:fileIdentifier> of 420f889f-70e3-4ff4-ab27-190563fb7f8e can be inserted through CSW or uploaded through a MEF import as well as deleted through a CSW transaction. However, 420F889f-70e3-4ff4-ab27-190563fb7f8e (first letter in upper case) can be inserted, uploaded, searched, displayed but not deleted regardless of case sensitive or lower case notation in the delete transaction request..

My guess is that GN's delete transaction function is case sensitive and that it changes the input UUID to lower case while GN still stores the metadata record's UUID as submitted.

If UUIDs are not case sensitive, then the hypothesized "to lower case" function on CSW delete should be fixed (I am still trying to understand GN's code - any hints are greatly appreciated!).
If UUIDs are treated as case sensitive, then the delete requests should still work.
If GN makes lower case UUID mandatory, then it would be very helpful for GN to automatically change the case of ISO 19139 <gmd:fileIdentifier> and MEF <uuid> element values on import, insert, or update.

To me UUIDs represent hex values and I prefer a case insensitive treatment (lower case both UUID before comparison?).
However, I do not know GN's stand on it.

Ciao, Wolfgang

--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500

sounds like a bug to me. UUIDs should be handled by GeoNetwork as the hexadecimal values that they are. Any operations on them should thus work case-insensitive. If that’s no the case in some operation, as you sketched, it should be fixed.

My 2$

heikki

On Tue, Feb 9, 2010 at 10:56 PM, Wolfgang Grunberg <wgrunberg@anonymised.com> wrote:

GeoNetwork’s (2.4) MEF import and CSW Insert transaction allow for upper
and lower case UUID GUIDs (420f889f-70e3-4ff4-ab27-190563fb7f8e or
420F889F-70E3-4FF4-AB27-190563FB7F8E). Both GN’s search interface and
CSW GetRecordById transactions are case insensitive. However, GN’s CSW
Delete transaction implementation is not just case sensitive but is
incapable of recognizing upper casing at all.

For example, a ISO 19139 metadata record with a gmd:fileIdentifier of
420f889f-70e3-4ff4-ab27-190563fb7f8e can be inserted through CSW or
uploaded through a MEF import as well as deleted through a CSW
transaction. However, 420F889f-70e3-4ff4-ab27-190563fb7f8e (first letter
in upper case) can be inserted, uploaded, searched, displayed but not
deleted regardless of case sensitive or lower case notation in the
delete transaction request…

My guess is that GN’s delete transaction function is case sensitive and
that it changes the input UUID to lower case while GN still stores the
metadata record’s UUID as submitted.

If UUIDs are not case sensitive, then the hypothesized “to lower case”
function on CSW delete should be fixed (I am still trying to understand
GN’s code - any hints are greatly appreciated!).
If UUIDs are treated as case sensitive, then the delete requests should
still work.
If GN makes lower case UUID mandatory, then it would be very helpful for
GN to automatically change the case of ISO 19139 gmd:fileIdentifier
and MEF element values on import, insert, or update.

To me UUIDs represent hex values and I prefer a case insensitive
treatment (lower case both UUID before comparison?).
However, I do not know GN’s stand on it.

Ciao, Wolfgang


Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500


SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Heikki,
Should I open a bug ticket in Trac for this?
WG

···
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
[wgrunberg@anonymised.com](mailto:wgrunberg@anonymised.com)
520-770-3500

sounds like a bug to me. UUIDs should be handled by GeoNetwork as the hexadecimal values that they are. Any operations on them should thus work case-insensitive. If that’s no the case in some operation, as you sketched, it should be fixed.

My 2$

heikki

On Tue, Feb 9, 2010 at 10:56 PM, Wolfgang Grunberg <wgrunberg@anonymised.com> wrote:

GeoNetwork’s (2.4) MEF import and CSW Insert transaction allow for upper
and lower case UUID GUIDs (420f889f-70e3-4ff4-ab27-190563fb7f8e or
420F889F-70E3-4FF4-AB27-190563FB7F8E). Both GN’s search interface and
CSW GetRecordById transactions are case insensitive. However, GN’s CSW
Delete transaction implementation is not just case sensitive but is
incapable of recognizing upper casing at all.

For example, a ISO 19139 metadata record with a gmd:fileIdentifier of
420f889f-70e3-4ff4-ab27-190563fb7f8e can be inserted through CSW or
uploaded through a MEF import as well as deleted through a CSW
transaction. However, 420F889f-70e3-4ff4-ab27-190563fb7f8e (first letter
in upper case) can be inserted, uploaded, searched, displayed but not
deleted regardless of case sensitive or lower case notation in the
delete transaction request…

My guess is that GN’s delete transaction function is case sensitive and
that it changes the input UUID to lower case while GN still stores the
metadata record’s UUID as submitted.

If UUIDs are not case sensitive, then the hypothesized “to lower case”
function on CSW delete should be fixed (I am still trying to understand
GN’s code - any hints are greatly appreciated!).
If UUIDs are treated as case sensitive, then the delete requests should
still work.
If GN makes lower case UUID mandatory, then it would be very helpful for
GN to automatically change the case of ISO 19139 gmd:fileIdentifier
and MEF element values on import, insert, or update.

To me UUIDs represent hex values and I prefer a case insensitive
treatment (lower case both UUID before comparison?).
However, I do not know GN’s stand on it.

Ciao, Wolfgang


Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500


SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork