Skip to content

Commit

Permalink
Mark parameter in ext/mysqli as sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWolla committed Jun 13, 2022
1 parent 788b7a0 commit 3a4d1b6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions ext/mysqli/mysqli.c
Expand Up @@ -29,6 +29,7 @@
#include "php_mysqli.h"
#include "php_mysqli_structs.h"
#include "mysqli_priv.h"
#include "zend_attributes.h"
#include "zend_exceptions.h"
#include "ext/spl/spl_exceptions.h"
#include "zend_interfaces.h"
Expand Down
10 changes: 9 additions & 1 deletion ext/mysqli/mysqli.stub.php
Expand Up @@ -149,6 +149,7 @@ public function autocommit(bool $enable): bool {}
public function begin_transaction(int $flags = 0, ?string $name = null): bool {}

/**
* @sensitive-param $password
* @tentative-return-type
* @alias mysqli_change_user
*/
Expand All @@ -174,6 +175,7 @@ public function close() {} // TODO make return type void
public function commit(int $flags = 0, ?string $name = null): bool {}

/**
* @sensitive-param $password
* @tentative-return-type
* @alias mysqli_connect
* @no-verify
Expand Down Expand Up @@ -287,6 +289,7 @@ public function prepare(string $query): mysqli_stmt|false {}
public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {}

/**
* @sensitive-param $password
* @tentative-return-type
* @alias mysqli_real_connect
*/
Expand Down Expand Up @@ -740,6 +743,7 @@ function mysqli_autocommit(mysqli $mysql, bool $enable): bool {}

function mysqli_begin_transaction(mysqli $mysql, int $flags = 0, ?string $name = null): bool {}

/** @sensitive-param $password */
function mysqli_change_user(mysqli $mysql, string $username, string $password, ?string $database): bool {}

/** @refcount 1 */
Expand All @@ -750,7 +754,10 @@ function mysqli_close(mysqli $mysql): bool {} // TODO make return type void

function mysqli_commit(mysqli $mysql, int $flags = 0, ?string $name = null): bool {}

/** @refcount 1 */
/**
* @refcount 1
* @sensitive-param $password
*/
function mysqli_connect(
?string $hostname = null,
?string $username = null,
Expand Down Expand Up @@ -925,6 +932,7 @@ function mysqli_report(int $flags): bool {}
/** @refcount 1 */
function mysqli_query(mysqli $mysql, string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {}

/** @sensitive-param $password */
function mysqli_real_connect(
mysqli $mysql,
?string $hostname = null,
Expand Down
8 changes: 7 additions & 1 deletion ext/mysqli/mysqli_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a4d1b6

Please sign in to comment.