Opened 6 years ago

Closed 6 years ago

#4415 closed defect (fixed)

ST_GeomFromGeoHash allows invalid base32 characters

Reported by: johnpowell Owned by: pramsey
Priority: medium Milestone: PostGIS 2.5.3
Component: postgis Version: 2.4.x
Keywords: Cc:

Description

SELECT ST_AsText(ST_GeomFromGeoHash('IamNotAGeoHash_ThisIsABug')) returns POINT(7.23566132272554 -65.0109736310277). It appears that there is no check in decode_geohash_bbox, https://postgis.net/docs/doxygen/2.5/dc/dc0/lwalgorithm_8c_source.html#l00584, for characters that are not defined in base32.

Change History (1)

comment:1 by Algunenano, 6 years ago

Resolution: fixed
Status: newclosed

This was fixed as part of #4406

SELECT ST_AsText(ST_GeomFromGeoHash('IamNotAGeoHash_ThisIsABug'));
ERROR:  decode_geohash_bbox: Invalid character 'I'
CONTEXT:  SQL function "st_geomfromgeohash" statement 1
Note: See TracTickets for help on using tickets.