The statistics name RFC 9421 signatures

A delivery signed with RFC 9421 was counted under "other": its algorithm
(rsa-v1_5-sha256) has an underscore, which a signature name could not
hold. It is now counted as rfc9421:rsa-v1_5-sha256, as WordPress's are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-05 07:04:35 +02:00
1 parent 01e5aa4ddd
commit 8686275b69
2 files changed
+3 -1

No files matched your search

@@ -49,6 +49,8 @@ namespace PrivaPub.Tests.Statistics
Assert.Equal("-", Interactions.Host("evil host/with path"));
Assert.Equal("-", Interactions.Host(default));
Assert.Equal("social.example", Interactions.HostOf("https://Social.Example:8443/users/x"));
// RFC 9421's algorithm names carry an underscore
Assert.Equal("rfc9421:rsa-v1_5-sha256", Interactions.Sanitize(new InteractionEvent { Signature = "rfc9421:rsa-v1_5-sha256" }).Signature);
}
[Fact]
@@ -95,7 +95,7 @@ namespace PrivaPub.Infrastructure.Statistics
[GeneratedRegex("^[a-z0-9][a-z0-9-]{0,39}$")]
private static partial Regex KebabWord();
[GeneratedRegex("^[a-z0-9][a-z0-9:-]{0,39}$")]
[GeneratedRegex("^[a-z0-9][a-z0-9:_-]{0,39}$")]
private static partial Regex SignatureName();
[GeneratedRegex("^[a-z0-9][a-z0-9:/+.-]{0,63}$")]