-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixed incorrect handling of single quotes in SQL-Strings #842
Conversation
…epeated single-quote (DBAL-1205)
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DBAL-1210 We use Jira to track the state of pull requests and the versions they got |
OR bar=:a_param2||':not_a_param3' | ||
OR bar=':not_a_param4 '':not_a_param5'' :not_a_param6' | ||
OR bar='' | ||
OR bar=':a_param3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong. OR bar=''
is correct and comparing to an empty string so the subsequent OR bar=':a_param3
is invalid SQL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you are right. In fact it should not have found this parameter, but I guess the regex considered it as outside quotes because it did not end with a quote. But I am happy enough if it does not find parameters in a "correct" string.
The original issue is #1151 |
Fixed incorrect handling of single quotes in SQL-Strings
@ancpru thanks! |
escaped by repeated single-quote (DBAL-1205)