nextcloud/tests/lib/Security
Micke Nordin cc9e0ba582 fix(http-sig): make setSignature public and skip third-party-dependent test
Two CI failures introduced by the test additions in this PR:

1. testEd25519VerifyAcceptedWhenSodiumLoaded calls setSignature() to inject
   an externally-produced Ed25519 signature (since Algorithm::sign() rejects
   Ed25519 by design). setSignature was declared protected, so the test
   couldn't call it from outside the class hierarchy. Make it public —
   SignedRequest lives in the OC\ private namespace, so this widens
   internal-only visibility, not the public API surface.

2. testParseKeyRejectsContradictoryAlg expected firebase/php-jwt's
   JWK::parseKey() to throw on a kty=OKP/crv=Ed25519/alg=ES256 key. The
   current firebase/php-jwt version does not validate that coherence at
   parse time, so the test now fails to see any throwable. The actual
   security check happens at Algorithm::verify() time and is covered by
   testVerifyEd25519KeyAgainstES256Alg right above it. Skip the parse-time
   test with a comment pointing at the verify-time coverage.

Signed-off-by: Micke Nordin <kano@sunet.se>
2026-05-27 11:03:55 +02:00
..
Bruteforce chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
CSP chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
CSRF chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
Events refactor: Add void return type to PHPUnit test methods 2024-09-15 22:32:31 +02:00
FeaturePolicy chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
IdentityProof chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
Ip chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
Normalizer chore: run rector 2025-07-01 22:45:52 +02:00
RateLimiting chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
Signature fix(http-sig): make setSignature public and skip third-party-dependent test 2026-05-27 11:03:55 +02:00
VerificationToken chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
CertificateManagerTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
CertificateTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
CredentialsManagerTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
CryptoTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
HasherTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
RemoteHostValidatorIntegrationTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
RemoteHostValidatorTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
SecureRandomTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00
TrustedDomainHelperTest.php chore: add missing Override attribute to test files 2026-04-28 21:29:28 +02:00