From b5eda71ade36d7b1709dafc0e8d9bf30acd85018 Mon Sep 17 00:00:00 2001 From: colshrapnel Date: Wed, 15 May 2024 10:50:44 +0300 Subject: [PATCH 1/2] Adding #[\SensitiveParameter] attribute It seems that #[\SensitiveParameter] is already added to $password parameter so it should be reflected on the man page --- reference/mysqli/mysqli/construct.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reference/mysqli/mysqli/construct.xml b/reference/mysqli/mysqli/construct.xml index bbb9d519c3bb..0fc874549433 100644 --- a/reference/mysqli/mysqli/construct.xml +++ b/reference/mysqli/mysqli/construct.xml @@ -15,6 +15,7 @@ public mysqli::__construct stringnullhostname&null; stringnullusername&null; + stringnull#[\SensitiveParameter]&null; stringnullpassword&null; stringnulldatabase&null; intnullport&null; @@ -24,6 +25,7 @@ public boolmysqli::connect stringnullhostname&null; stringnullusername&null; + stringnull#[\SensitiveParameter]&null; stringnullpassword&null; stringnulldatabase&null; intnullport&null; @@ -34,6 +36,7 @@ mysqlifalsemysqli_connect stringnullhostname&null; stringnullusername&null; + stringnull#[\SensitiveParameter]&null; stringnullpassword&null; stringnulldatabase&null; intnullport&null; @@ -304,6 +307,12 @@ if (mysqli_errno($mysqli)) { variable won't be available and PHP will have problems loading Winsock. + + + $password parameter is guarded by #[\SensitiveParameter] + attribute, so it won't appear in the stack trace. + + From eff211e475b3c3a8b9151cd5c679c21a5d11e81c Mon Sep 17 00:00:00 2001 From: colshrapnel Date: Wed, 15 May 2024 18:13:36 +0300 Subject: [PATCH 2/2] Adding #[\SensitiveParameter] attribute Co-authored-by: Gina Peter Banyard --- reference/mysqli/mysqli/construct.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reference/mysqli/mysqli/construct.xml b/reference/mysqli/mysqli/construct.xml index 0fc874549433..e5bd27b95405 100644 --- a/reference/mysqli/mysqli/construct.xml +++ b/reference/mysqli/mysqli/construct.xml @@ -15,8 +15,7 @@ public mysqli::__construct stringnullhostname&null; stringnullusername&null; - stringnull#[\SensitiveParameter]&null; - stringnullpassword&null; + #[\SensitiveParameter]stringnullpassword&null; stringnulldatabase&null; intnullport&null; stringnullsocket&null;