Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1596 closed defect (fixed)

UpdateGeometryColumn allows invalid SRIDs

Reported by: Mike Toews Owned by: strk
Priority: medium Milestone: PostGIS 1.5.4
Component: postgis Version: trunk
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 Mike Toews 7 years ago.
patch for 1.5 branch
invalid_srid-2.0.patch (2.0 KB) - added by Mike Toews 7 years ago.
patch for trunk

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Mike Toews

Attachment: invalid_srid-1.5.patch added

patch for 1.5 branch

Changed 7 years ago by Mike Toews

Attachment: invalid_srid-2.0.patch added

patch for trunk

comment:1 Changed 7 years ago by strk

Owner: changed from pramsey to strk
Status: newassigned

comment:2 Changed 7 years ago by strk

Committed in 2.0 with testcase as r9253

comment:3 Changed 7 years ago by strk

Resolution: fixed
Status: assignedclosed

Committed in 1.5 with testcase as r9254

comment:4 Changed 7 years ago by strk

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