-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Mark parameters in bundled extensions as sensitive #8352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8368db0
ff60f19
377c79c
ac76758
0b61bd6
082dcd8
eaeccb4
4c85201
3007bde
dcadf4b
39ff32c
67dad58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--TEST-- | ||
Test that sensitive parameters are marked sensitive. | ||
--FILE-- | ||
<?php | ||
try { | ||
var_dump(hash_equals('foo', null)); | ||
} catch (\Throwable $e) { | ||
echo $e, PHP_EOL; | ||
kocsismate marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
try { | ||
var_dump(hash_hmac('foo', 'bar', 'baz')); | ||
} catch (\Throwable $e) { | ||
echo $e, PHP_EOL; | ||
} | ||
?> | ||
--EXPECTF-- | ||
TypeError: hash_equals(): Argument #2 ($user_string) must be of type string, null given in %s:%d | ||
Stack trace: | ||
#0 %s(%d): hash_equals(Object(SensitiveParameterValue), Object(SensitiveParameterValue)) | ||
#1 {main} | ||
ValueError: hash_hmac(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm in %s:%d | ||
Stack trace: | ||
#0 %s(%d): hash_hmac('foo', 'bar', Object(SensitiveParameterValue)) | ||
#1 {main} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
|
||
#include "php.h" | ||
#include "php_ini.h" | ||
#include "Zend/zend_attributes.h" | ||
|
||
#include <stddef.h> | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,32 +294,42 @@ function oci_close($connection): ?bool {} | |
*/ | ||
function ocilogoff($connection): ?bool {} | ||
|
||
/** @return resource|false */ | ||
/** | ||
* @sensitive-param $password | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, the current order makes sense! Just make sure that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please clarify: Below all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, I'd say below all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, based on looking through a few of the other files I've done the following:
|
||
* @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 | ||
|
Uh oh!
There was an error while loading. Please reload this page.