Skip to content

Commit

Permalink
Mark parameter in ext/odbc as sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWolla committed Jun 13, 2022
1 parent ac6dbbd commit e85b17b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
10 changes: 8 additions & 2 deletions ext/odbc/odbc.stub.php
Expand Up @@ -69,10 +69,16 @@ function odbc_result_all($statement, string $format = ""): int|false {}
/** @param resource $statement */
function odbc_free_result($statement): bool {}

/** @return resource|false */
/**
* @sensitive-param $password
* @return resource|false
*/
function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}

/** @return resource|false */
/**
* @sensitive-param $password
* @return resource|false
*/
function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) {}

/** @param resource $odbc */
Expand Down
8 changes: 7 additions & 1 deletion ext/odbc/odbc_arginfo.h

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

3 changes: 3 additions & 0 deletions ext/odbc/php_odbc.c
Expand Up @@ -24,6 +24,7 @@

#include "php.h"
#include "php_globals.h"
#include "zend_attributes.h"

#include "ext/standard/info.h"
#include "ext/standard/php_string.h"
Expand Down Expand Up @@ -483,6 +484,8 @@ PHP_MINIT_FUNCTION(odbc)
putenv("DB2NOEXITLIST=TRUE");
#endif

register_odbc_symbols(module_number);

return SUCCESS;
}
/* }}} */
Expand Down

0 comments on commit e85b17b

Please sign in to comment.