note 129975 added to class.sensitiveparameter
| From: | miqrogroove@gmail.com | Date: | Sat, 11 Jan 2025 19:30:55 +0000 |
| Subject: | note 129975 added to class.sensitiveparameter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221788@lists.php.net to get a copy of this message | ||
Beware this attribute does nothing on object interfaces and will permit password exposure when used
incorrectly.
<?php
interface Server
{
public function connect(
#[\SensitiveParameter]
string $password,
);
}
class TestServer implements Server
{
public function connect(
string $password,
) {
throw new Exception('Guess what?');
}
}
($var = new TestServer())->connect('wrl!L3=6O57T9?r');
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.84.18 (proxied: 69.193.75.5)
----
Manual Page -- https://php.net/manual/en/class.sensitiveparameter.php
Edit -- https://main.php.net/note/edit/129975
Del: integrated -- https://main.php.net/note/delete/129975/integrated
Del: useless -- https://main.php.net/note/delete/129975/useless
Del: bad code -- https://main.php.net/note/delete/129975/bad+code
Del: spam -- https://main.php.net/note/delete/129975/spam
Del: non-english -- https://main.php.net/note/delete/129975/non-english
Del: in docs -- https://main.php.net/note/delete/129975/in+docs
Del: other reasons-- https://main.php.net/note/delete/129975
Reject -- https://main.php.net/note/reject/129975
Search -- https://main.php.net/manage/user-notes.php