VoterIdentity: anchor the device id grammar at \z so a trailing newline or control char is no second identity
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d171713ab1
commit
abb0986508
2 changed files with 20 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ public sealed record VoterIdentity(string Key, VoterClass Class, Guid? UserAccou
|
|||
{
|
||||
public const int MaxKeyLength = 120;
|
||||
|
||||
private static readonly Regex DeviceIdShape = new("^[A-Za-z0-9_-]{1,100}$", RegexOptions.CultureInvariant);
|
||||
private static readonly Regex DeviceIdShape = new(@"^[A-Za-z0-9_-]{1,100}\z", RegexOptions.CultureInvariant);
|
||||
|
||||
// The one place a voter key and class are decided. Never reads vote weight.
|
||||
public static VoterIdentity? For(CurrentBifrostActor actor, string? deviceId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue