Opened 7 years ago

Last modified 4 years ago

#3676 new defect

Add LEAKPROOF indication in functions

Reported by: strk Owned by: robe
Priority: low Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: Cc:


The LEAKPROOF keyword is supported since PostgreSQL 9.2, which is our minimum requirement. By default all functions are created as NOT leakproof, meaning they cannot be used in views with "security barrier" option.

We might want to tweak that definition carefully looking at each of the functions.


Change History (8)

comment:1 by komzpa, 7 years ago

Anything calling GEOS is not going to be leakproof, as GEOS tends to raise exceptions with 'invalid intersection at coordinate'. So some kind of 'take invalid geometry and try to intersect it with the world' with long enough bisection lets you get geometry out of db even if it's behind security barrier.

comment:2 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

comment:3 by robe, 6 years ago

Milestone: PostGIS Fund MePostGIS 2.5.0

I think all the functions that back operators we can consider leak proof since they don't involve GEOS or GDAL. Probably many of the geography ones except ST_Transform related are leak proof.

I'll slate this for 2.5, seems like we should be able to do for some.

comment:4 by pramsey, 6 years ago

Owner: changed from pramsey to robe
Priority: mediumlow

comment:5 by komzpa, 6 years ago

Milestone: PostGIS 2.5.0PostGIS Fund Me

comment:6 by savv, 4 years ago

It would be great if geometry_overlaps (and by extension, the && operator) could be made leakproof.

This would allow tables with RLS policies or views with a security_barrier to make effective use of geometry indices, which is currently not possible.

Last edited 4 years ago by savv (previous) (diff)

comment:7 by robe, 4 years ago

Milestone: PostGIS Fund MePostGIS 3.1.0

comment:8 by robe, 4 years ago

Milestone: PostGIS 3.1.0PostGIS Fund Me

we discussed this in code sprint and much more involved than what I had originally thought and not a highly asked for request so moving back to fundme

Note: See TracTickets for help on using tickets.