-
Notifications
You must be signed in to change notification settings - Fork 478
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
Preventing SQL Injection #274
Comments
Hi @r0man This is indeed required. Any idea how we could implement such a prepared statement parse with as least effort as possible ? |
@majst01 Thanks for the confirmation. No, don't have an idea yet. I'll let you know if I do :) |
Perhaps the most obvious way would be to support prepared statements in the jdbc lib or hibernate framework does i.e. :
this way you can sanitize the input for each argument. |
sure, but i dont want to add hibernate for example as a direct dependency to influxdb-java. Is there any small implementation out there which can be reused easily ? |
From Influxdb documentation this must look like: curl -G 'http://localhost:8086/query?db=mydb' --data-urlencode 'q=SELECT * FROM "mymeas" WHERE "myfield" > $field_value' --data-urlencode 'params={"field_value":30}' so adding a |
Thanks! |
But the current implementation does not allow this kind of query. We need to add this ability. |
I quite simple impl of Select is here https://github.com/gocraft/dbr/blob/master/select.go but apperently in golang. Could be used as a starting point |
Hello,
what's the proper way to prevent SQL injection in the Java client? I found this ticket for the Go client, but could not find anything related in the Java sources.
influxdata/influxdb#2926
Thanks, Roman.
The text was updated successfully, but these errors were encountered: