Skip to content

Commit 3a4d1b6

Browse files
committed
Mark parameter in ext/mysqli as sensitive
1 parent 788b7a0 commit 3a4d1b6

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

ext/mysqli/mysqli.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "php_mysqli.h"
3030
#include "php_mysqli_structs.h"
3131
#include "mysqli_priv.h"
32+
#include "zend_attributes.h"
3233
#include "zend_exceptions.h"
3334
#include "ext/spl/spl_exceptions.h"
3435
#include "zend_interfaces.h"

ext/mysqli/mysqli.stub.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public function autocommit(bool $enable): bool {}
149149
public function begin_transaction(int $flags = 0, ?string $name = null): bool {}
150150

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

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

289291
/**
292+
* @sensitive-param $password
290293
* @tentative-return-type
291294
* @alias mysqli_real_connect
292295
*/
@@ -740,6 +743,7 @@ function mysqli_autocommit(mysqli $mysql, bool $enable): bool {}
740743

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

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

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

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

753-
/** @refcount 1 */
757+
/**
758+
* @refcount 1
759+
* @sensitive-param $password
760+
*/
754761
function mysqli_connect(
755762
?string $hostname = null,
756763
?string $username = null,
@@ -925,6 +932,7 @@ function mysqli_report(int $flags): bool {}
925932
/** @refcount 1 */
926933
function mysqli_query(mysqli $mysql, string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {}
927934

935+
/** @sensitive-param $password */
928936
function mysqli_real_connect(
929937
mysqli $mysql,
930938
?string $hostname = null,

ext/mysqli/mysqli_arginfo.h

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)