Ticket #1596 (closed defect: fixed)

Opened 15 months ago

Last modified 15 months ago

UpdateGeometryColumn allows invalid SRIDs

Reported by: mwtoews 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

invalid_srid-1.5.patch Download (1.0 KB) - added by mwtoews 15 months ago.
patch for 1.5 branch
invalid_srid-2.0.patch Download (2.0 KB) - added by mwtoews 15 months ago.
patch for trunk

Change History

Changed 15 months ago by mwtoews

patch for 1.5 branch

Changed 15 months ago by mwtoews

patch for trunk

Changed 15 months ago by strk

  • owner changed from pramsey to strk
  • status changed from new to assigned

Changed 15 months ago by strk

Committed in 2.0 with testcase as r9253

Changed 15 months ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

Committed in 1.5 with testcase as r9254

Changed 15 months ago by strk

  • keywords history added
  • milestone changed from PostGIS 2.0.0 to PostGIS 1.5.4
Note: See TracTickets for help on using tickets.