Skip to content

Commit

Permalink
#10030 Add PDOStatement::bindValuebindValue() and PDOStatement::bindP…
Browse files Browse the repository at this point in the history
…aram() as sources for TaintedSql
  • Loading branch information
cgocast committed Jul 21, 2023
1 parent 9c814c8 commit 719496b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions stubs/extensions/pdo.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ class PDOStatement implements Traversable
* @return false|T
*/
public function fetchObject($class = \stdclass::class, array $ctorArgs = array()) {}

/**
* @psalm-taint-sink sql $value
*/
public function bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR): bool {}

/**
* @psalm-taint-sink sql $var
*/
public function bindParam(string|int $param, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null): bool {}
}

class PDOException extends RuntimeException {
Expand Down

0 comments on commit 719496b

Please sign in to comment.