Commit 68990405 authored by Bertold von Dormilich's avatar Bertold von Dormilich Committed by GitHub

fixing issue #2814

Replaced the code examples for `set()` to show that the value parameter is not escaped and thus could pose an SQL injection vulnerability.
parent 49bf43bb
......@@ -540,7 +540,7 @@ class QueryBuilder
* <code>
* $qb = $conn->createQueryBuilder()
* ->update('users', 'u')
* ->set('u.password', md5('password'))
* ->set('u.last_login', 'NOW()')
* ->where('u.id = ?');
* </code>
*
......@@ -733,7 +733,7 @@ class QueryBuilder
* <code>
* $qb = $conn->createQueryBuilder()
* ->update('users', 'u')
* ->set('u.password', md5('password'))
* ->set('u.last_login', 'NOW()')
* ->where('u.id = ?');
* </code>
*
......@@ -765,7 +765,7 @@ class QueryBuilder
* $or->add($qb->expr()->eq('u.id', 2));
*
* $qb->update('users', 'u')
* ->set('u.password', md5('password'))
* ->set('u.last_login', 'NOW()')
* ->where($or);
* </code>
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment