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

#2814 removing incorrect QueryBuilder#set() documentation, which was showing wrong password hashing and value binding practices (combo!) #2818

Merged
merged 1 commit into from
Aug 18, 2017

Conversation

Dormilich
Copy link
Contributor

Replaced the code examples for set() to show that the value parameter is not escaped and thus could pose an SQL injection vulnerability.

Replaced the code examples for `set()` to show that the value parameter is not escaped and thus could pose an SQL injection vulnerability.
@@ -540,7 +540,7 @@ public function delete($delete = null, $alias = null)
* <code>
* $qb = $conn->createQueryBuilder()
* ->update('users', 'u')
* ->set('u.password', md5('password'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH WOW, we had md5('password') in the docs?! Shame on us :-(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and no parameter binding: combo shame! :-\

@Ocramius Ocramius added this to the 2.7 milestone Aug 18, 2017
@Ocramius Ocramius self-assigned this Aug 18, 2017
@Ocramius
Copy link
Member

LGTM 🚢

Thanks @Dormilich!

@Ocramius Ocramius merged commit 6fdfcab into doctrine:master Aug 18, 2017
@Ocramius
Copy link
Member

Fixes #2814

@Ocramius Ocramius changed the title fixing issue #2814 #2814 removing incorrect QueryBuilder#set() documentation, which was showing wrong password hashing and value binding practices (combo!) Aug 18, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants