Skip to content

[stable27] [oauth2] Store hashed secret instead of encrypted#47703

Merged
AndyScherzinger merged 3 commits intostable27from
backport/47635/stable27
Sep 4, 2024
Merged

[stable27] [oauth2] Store hashed secret instead of encrypted#47703
AndyScherzinger merged 3 commits intostable27from
backport/47635/stable27

Conversation

@julien-nc
Copy link
Member

Manual backport of #47635

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc
Copy link
Member Author

/compile

try {
$storedClientSecret = $this->crypto->decrypt($client->getSecret());
$storedClientSecretHash = $client->getSecret();
$clientSecretHash = bin2hex($this->crypto->calculateHMAC($client_secret));

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of OCP\Security\ICrypto::calculateHMAC cannot be null, possibly null value provided
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the backport/47635/stable27 branch from 502152e to 2345457 Compare September 3, 2024 11:28
@julien-nc
Copy link
Member Author

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@AndyScherzinger AndyScherzinger merged commit 479a0a9 into stable27 Sep 4, 2024
@AndyScherzinger AndyScherzinger deleted the backport/47635/stable27 branch September 4, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants