Skip to content

Commit

Permalink
validation: fix comment about WireGuard key length
Browse files Browse the repository at this point in the history
  • Loading branch information
slyon committed Sep 12, 2024
1 parent 4a82c3b commit 458ac95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ is_hostname(const char *hostname)
gboolean
is_wireguard_key(const char* key)
{
/* Check if this is (most likely) a 265bit, base64 encoded wireguard key */
/* Check if this is (most likely) a 256 bit, base64 encoded wireguard key */
if (strlen(key) == 44 && key[43] == '=' && key[42] != '=') {
static const gchar *pattern = "^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=)+$";
return g_regex_match_simple(pattern, key, 0, G_REGEX_MATCH_NOTEMPTY);
Expand Down

0 comments on commit 458ac95

Please sign in to comment.