Opened 6 years ago

Last modified 6 years ago

#4273 closed defect

too permissive WKT parser — at Version 1

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

Description (last modified by komzpa)

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

Change History (1)

comment:1 by komzpa, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.