[postgis-tickets] [PostGIS] #4273: too permissive WKT parser

PostGIS trac at osgeo.org
Wed Dec 12 12:19:50 PST 2018


#4273: too permissive WKT parser
---------------------+---------------------------
 Reporter:  komzpa   |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 2.5.2
Component:  postgis  |    Version:  2.4.x
 Keywords:           |
---------------------+---------------------------
 ```
 SELECT name, similarity(name, 'Минск') AS dist FROM planet_osm_point
 WHERE name % 'Минск' AND ST_DWithin(ST_Transform(way, 4326)::geography,
 ST_GeomFromText('POINT(27.5618791 53.902334)::geography', 4326), 50000)
 ORDER BY dist DESC;
 ```

 User by mistake added a cast on wrong side of ' ' and we did not get any
 parse error.

 {{{
 23:06:43 [kom] > select ST_AsEWKT(ST_GeomFromText('POINT(27.5618791
 53.902334)::geography', 4326));
 ┌───────────────────────────────────────┐
 │               st_asewkt               │
 ├───────────────────────────────────────┤
 │ SRID=4326;POINT(27.5618791 53.902334) │
 └───────────────────────────────────────┘
 (1 row)

 Time: 3,475 ms
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4273>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list