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.03k stars 3.25k forks source link

Worth mentioning for passwords #991

Open github-scx opened 11 months ago

github-scx commented 11 months 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'; }