BigQueryProvider icon indicating copy to clipboard operation
BigQueryProvider copied to clipboard

Parameters escaping

Open Agitto opened this issue 11 years ago • 3 comments

Agitto avatar Jul 14 '15 10:07 Agitto

It is used to avoid the SQL-injection. We have to change the parameter value appearing in quotation marks, slashes, etc. for the same symbol with backslash. It is impossible to reproduce in the tests, because C # means you can not create a line with no backslash-quote ("- is impossible. /" - you can).

repushko avatar Jul 14 '15 11:07 repushko

BigQuery allows you to send a string value '' and ''. We agreed to use single quotes. When we use escaping (state='CA' or 1=1--' => state='CA'' or 1=1--'), we get GoogleApiException. Do I need to do something more or that's enough? I think that the problem is solved: it is impossible to hold the SQL-injection.

repushko avatar Jul 15 '15 11:07 repushko

So I think we do not need tests to "" and /, as this will result in an exception.

repushko avatar Jul 15 '15 11:07 repushko