🐛 Fix some issues in the singature verification

This commit is contained in:
2025-12-30 19:39:39 +08:00
parent 1d95d637dd
commit cfb4428e78

View File

@@ -256,15 +256,18 @@ public class ActivityPubSignatureService(
return string.Empty; return string.Empty;
var sb = new StringBuilder(); var sb = new StringBuilder();
var first = true;
foreach (var header in headers) foreach (var header in headers)
{ {
if (header == "content-type") if (header == "content-type")
continue; continue;
if (sb.Length > 0) if (!first)
sb.Append('\n'); sb.Append('\n');
first = false;
sb.Append(header.ToLower()); sb.Append(header.ToLower());
sb.Append(": "); sb.Append(": ");