FIX: Missing "=" in possible characters in SSH pubkeys.

This commit is contained in:
Johannes Erwerle 2026-04-06 18:59:53 +02:00
parent 9fdb75720c
commit 8fb0c1393a

View file

@ -16,7 +16,7 @@ class BorgRepository(models.Model):
key = models.TextField( key = models.TextField(
validators=[ validators=[
RegexValidator( RegexValidator(
r"(ssh\-rsa|ecdsa\-sha2\-nistp256|ssh\-ed25519) ([a-zA-Z0-9\+/]+) (\S*)", r"(ssh\-rsa|ecdsa\-sha2\-nistp256|ssh\-ed25519) ([a-zA-Z0-9\+/=]+) (\S*)",
message="not a valid SSH public key.", message="not a valid SSH public key.",
), ),
] ]