-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query runner: Block known problematic functions if found in parse tree #660
Conversation
This acts as an additional defense in case the user does not revoke permissions from non-superuser for dblink as we recommend.
switch stmt.(type) { | ||
case *pg_query.Node_SelectStmt: | ||
// Allowed, continue | ||
// Note that we permit wCTEs here (for now), and instead rely on the read-only transaction to block them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked a bit offline too, but we could potentially do these checks in the below treewalk so that we can also check wCTEs. I think it's fine as is for now, but we could come back later potentially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, lets revise that at a later point, but agreed we could adjust this to match the check we do on the server side for wCTEs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving readability with treewalker 👍
This acts as an additional defense in case the user does not revoke permissions from non-superuser for dblink as we recommend.