-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
sql-injection: consider case using psycopg2.extensions.AsIs
#225
Comments
Well, you are ruining the trick for avoiding the check, as there's no other way of for example build the SQL views reports. |
We can use a sanitize method like Could you share me a code bypassing this check using AsIs? In order to check if there is a way to skip a special case from the check |
Using private attributes was fixed here: I mean, sql-injection is not face out if the variables startswith I just have created the following PR to test the case: |
Can you try with a variable inside the same scope (not an object variable)? |
Well, I mean if it doesn't count when the variable is in the same scope. Any way, I don't like this, as you are reducing also the possibilities. What about if I want to put this: "CREATE VIEW %s AS (SELECT %s FROM res_partner)" % (_variable, self.select())) |
I just have created a table of True with all cases using public and private attributes and using with and without underscored variables.
Really, if you use a variable doesn't matter the name. |
Then that's why I don't want this new check, because that are valid cases. |
I don't get you. |
Enabling this check, my cases will be considered error. |
Considering
In this case, you are in the first case, then, your cases won't considered sql-injection error. |
Closing since it is a valid workaround where the dev needs to be sure it is not a sql-injection |
Steps:
Saw:
sql-injection checker is not detected.
Expected:
sql-injection checker detected.
The text was updated successfully, but these errors were encountered: