1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
psalm/docs/running_psalm/issues/TaintedUserSecret.md

21 lines
390 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TaintedUserSecret
Emitted when tainted input detection is turned on and data marked as a user secret is detected somewhere it shouldnt be.
```php
<?php
class User {
/**
* @psalm-taint-source user_secret
*/
public function getPassword() : string {
return "$omePa$$word";
}
}
function showUserPassword(User $user) {
echo $user->getPassword();
}
```