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

Reduce false positive by ending at an operator for issue #20 #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cashlo
Copy link

@cashlo cashlo commented May 25, 2018

This reduce false positive like

"update" eq $foo;
$foo eq "update" && $bar;
$foo ne "select" || $bar;

This reduce false positive like 

"update" eq $foo;
$foo eq "update" && $bar;
$foo ne "select" || $bar;
@coveralls
Copy link

coveralls commented May 25, 2018

Coverage Status

Coverage increased (+0.1%) to 97.203% when pulling 12ef1b8 on cashlo:master into 13fa7f0 on guillaumeaubert:master.

@cashlo
Copy link
Author

cashlo commented May 28, 2018

I was going to use qw{ . .= , => } as the list of operators because of usage like my $sql = sprintf "SELECT %s FROM %s" => $column, $table; but decided to align with current behaviour.

@oalders
Copy link

oalders commented Jan 15, 2021

This breaks a couple of tests, which apparently pass under 5.10 on Travis.

#   Failed test 'ValuesAndExpressions::PreventSQLInjection - line 283 - Partial use of quote() and quote_identifier().'
#   at t/30-policy.t line 22.

#   Failed test 'ValuesAndExpressions::PreventSQLInjection - line 402 - Custom quoting method, ensure that defaults are disabled.'
#   at t/30-policy.t line 22.
# Expected 1 violations, got 0.

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.

3 participants