mirror of
https://github.com/nextcloud/server.git
synced 2026-06-23 07:30:41 -04:00
When decrypting a v3 ciphertext with a mismatched secret, the first attempt throws an Exception (HMAC mismatch). The fallback then calls decryptWithoutSecret() with an empty string, which causes hash_hkdf() to throw a ValueError. Since ValueError extends \Error rather than \Exception, it bypassed the catch block and propagated as an unhandled error, crashing the whole request. Wrap the fallback in its own try/catch(\Throwable) and rethrow the original Exception so callers get a meaningful HMAC mismatch error. Signed-off-by: Anna Larch <anna@nextcloud.com> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Bruteforce | ||
| CSP | ||
| CSRF | ||
| Events | ||
| FeaturePolicy | ||
| IdentityProof | ||
| Ip | ||
| Normalizer | ||
| RateLimiting | ||
| VerificationToken | ||
| CertificateManagerTest.php | ||
| CertificateTest.php | ||
| CredentialsManagerTest.php | ||
| CryptoTest.php | ||
| HasherTest.php | ||
| RemoteHostValidatorIntegrationTest.php | ||
| RemoteHostValidatorTest.php | ||
| SecureRandomTest.php | ||
| TrustedDomainHelperTest.php | ||