1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 10:14:04 +00:00

Declare sensitive parameters as sensitive

... just so that they don't show up in logs
This commit is contained in:
Mark 2024-12-29 09:02:25 +01:00
parent eff41553d7
commit 10d40fd84b
No known key found for this signature in database
GPG key ID: 79CFF7869BD39873
2 changed files with 2 additions and 1 deletions

View file

@ -66,6 +66,7 @@ class CreateUserWithRLSPolicies extends Command
protected function makeDatabaseConfig(
PermissionControlledPostgreSQLSchemaManager $manager,
string $username,
#[\SensitiveParameter]
string $password,
): DatabaseConfig {
/** @var TenantWithDatabase $tenantModel */

View file

@ -30,7 +30,7 @@ class UserImpersonation implements Feature
}
/** Impersonate a user and get an HTTP redirect response. */
public static function makeResponse(string|ImpersonationToken $token, ?int $ttl = null): RedirectResponse
public static function makeResponse(#[\SensitiveParameter] string|ImpersonationToken $token, ?int $ttl = null): RedirectResponse
{
/** @var ImpersonationToken $token */
$token = $token instanceof ImpersonationToken ? $token : ImpersonationToken::findOrFail($token);