♻️ Adjust in key lookup in verification

This commit is contained in:
2025-12-30 21:30:25 +08:00
parent cfb4428e78
commit 67cd372b8d
2 changed files with 13 additions and 28 deletions

View File

@@ -40,7 +40,7 @@ public class ActivityPubKeyService(ILogger<ActivityPubKeyService> logger)
var signature = Convert.FromBase64String(signatureBase64);
logger.LogDebug("Attempting signature verification. Key starts with: {KeyStart}",
publicKeyPem.Substring(0, Math.Min(50, publicKeyPem.Length)));
publicKeyPem[..Math.Min(50, publicKeyPem.Length)]);
var result = rsa.VerifyData(
Encoding.UTF8.GetBytes(data),