From 15a28e7d954c025363f14ab97c4367ad5de5af20 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 1 Mar 2023 15:13:59 +0100 Subject: Client: Allow max version to be 20 characters Bit long maybe but we shouldn't limit it too much --- client/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/client.go b/client/client.go index 0dad8c8..2bb0cc2 100644 --- a/client/client.go +++ b/client/client.go @@ -147,8 +147,8 @@ func (c *Client) Register( return errors.Errorf("client ID is not allowed: '%v', see https://git.sr.ht/~fkooman/vpn-user-portal/tree/v3/item/src/OAuth/VpnClientDb.php for a list of allowed IDs", name) } - if len([]rune(version)) > 10 { - return errors.Errorf("version is not allowed: '%s', must be max 10 characters", version) + if len([]rune(version)) > 20 { + return errors.Errorf("version is not allowed: '%s', must be max 20 characters", version) } http.RegisterAgent(userAgentName(name), version) -- cgit v1.2.3