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

Allow queries with parameters to avoid SQL injection #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Allow queries with parameters to avoid SQL injection #75

wants to merge 2 commits into from

Conversation

kljh
Copy link

@kljh kljh commented Apr 5, 2019

Allow queries with parameters to avoid SQL injection and issues with escaping strings.

This means we can replace
df = sqldf("select * from df where id='"+id+"'")
with the parametrised query
df = sqldf("select * from df where id=?", params = (id, ))
which will work even if the variable id contains single quotes.

Thanks a lot for this nice project.

kljh added 2 commits April 5, 2019 21:52
…caping strings.

This means we can replace
  df = sqldf("select * from df where id='"+id+"'")
with the parametrised query
  df = sqldf("select * from df where id=?", params = (id, ))
which will work even if the variable id contains single quotes.

Thanks a lot for this nice project.
@pkvprakash
Copy link

pkvprakash commented Jul 21, 2020

@aplavin Can you please review this PR?

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 this pull request may close these issues.

None yet

2 participants