codeguy / php-the-right-way

An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web
https://www.phptherightway.com
Other
9.07k stars 3.24k forks source link

Worth mentioning for passwords #991

Open github-scx opened 1 year ago

github-scx commented 1 year ago

I think it would be worth mentioning the #[SensitiveParameter] they added. It will make it so that the variable doesn't get thrown in stack dumps, or log files internally to PHP. This is in 8.2, and I think it makes it a little more secure.

public function login(string $email, #[SensitiveParameter] string $password) { echo 'login'; }