Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1596 closed defect (fixed)

UpdateGeometryColumn allows invalid SRIDs

Reported by: mwtoews Owned by: strk
Priority: medium Milestone: PostGIS 1.5.4
Component: postgis Version: master
Keywords: history Cc:

Description

As hinted from #1594, you can AddGeometryColumn with an unknown SRID, then use UpdateGeometrySRID to sneak in an invalid SRID — one that is not in spatial_ref_sys:

-- All good
create table a (gid serial primary key);
select AddGeometryColumn('a', 'geom', -1, 'POINT', 2);

-- Shouldn't happen
select UpdateGeometrySRID('a', 'geom', 123456);

Attachments (2)

invalid_srid-1.5.patch (1.0 KB ) - added by mwtoews 13 years ago.
patch for 1.5 branch
invalid_srid-2.0.patch (2.0 KB ) - added by mwtoews 13 years ago.
patch for trunk

Download all attachments as: .zip

Change History (6)

by mwtoews, 13 years ago

Attachment: invalid_srid-1.5.patch added

patch for 1.5 branch

by mwtoews, 13 years ago

Attachment: invalid_srid-2.0.patch added

patch for trunk

comment:1 by strk, 13 years ago

Owner: changed from pramsey to strk
Status: newassigned

comment:2 by strk, 13 years ago

Committed in 2.0 with testcase as r9253

comment:3 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

Committed in 1.5 with testcase as r9254

comment:4 by strk, 13 years ago

Keywords: history added
Milestone: PostGIS 2.0.0PostGIS 1.5.4
Note: See TracTickets for help on using tickets.