Skip to content

Commit

Permalink
Mark parameter in ext/oci8 as sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWolla committed Jun 13, 2022
1 parent 3a4d1b6 commit ac6dbbd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ext/oci8/oci8.c
Expand Up @@ -31,6 +31,7 @@
#include "php.h"
#include "ext/standard/info.h"
#include "php_ini.h"
#include "zend_attributes.h"
#include "zend_smart_str.h"

#ifdef HAVE_OCI8
Expand Down Expand Up @@ -385,6 +386,8 @@ PHP_MINIT_FUNCTION(oci)

REGISTER_LONG_CONSTANT("OCI_FO_RETRY", OCI_FO_RETRY, CONST_CS | CONST_PERSISTENT);

register_oci8_symbols(module_number);

return SUCCESS;
}

Expand Down
14 changes: 12 additions & 2 deletions ext/oci8/oci8.stub.php
Expand Up @@ -294,32 +294,42 @@ function oci_close($connection): ?bool {}
*/
function ocilogoff($connection): ?bool {}

/** @return resource|false */
/**
* @sensitive-param $password
* @return resource|false
*/
function oci_new_connect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT) {}

/**
* @sensitive-param $password
* @return resource|false
* @alias oci_new_connect
* @deprecated
*/
function ocinlogon(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT) {}

/**
* @sensitive-param $password
* @return resource|false
*/
function oci_connect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT) {}

/**
* @sensitive-param $password
* @return resource|false
* @alias oci_connect
* @deprecated
*/
function ocilogon(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT) {}

/** @return resource|false */
/**
* @sensitive-param $password
* @return resource|false
*/
function oci_pconnect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT) {}

/**
* @sensitive-param $password
* @return resource|false
* @alias oci_pconnect
* @deprecated
Expand Down
12 changes: 11 additions & 1 deletion ext/oci8/oci8_arginfo.h

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

0 comments on commit ac6dbbd

Please sign in to comment.