From 9970323ae91acca16f5fd83265e699d448a53035 Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Wed, 27 Jan 2021 12:43:07 +0100 Subject: [PATCH] Accept underscore as valid char in hostname strings --- CHANGELOG.md | 1 + base/hosts.c | 2 +- base/hosts_tests.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f5c43ac0..4e4223e9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Increase minimum gpgme version [#405](https://github.com/greenbone/gvm-libs/pull/405) - Always NULL check ifaddrs->ifa_addr [#416](https://github.com/greenbone/gvm-libs/pull/416) - Correct g_hash_table_remove arg [#419](https://github.com/greenbone/gvm-libs/pull/419) +- Accept underscore as valid char in hostname strings [#429](https://github.com/greenbone/gvm-libs/pull/429) [20.8.1]: https://github.com/greenbone/gvm-libs/compare/v20.8.0...gvm-libs-20.08 diff --git a/base/hosts.c b/base/hosts.c index d1e8ed6c1..502e4a2d0 100644 --- a/base/hosts.c +++ b/base/hosts.c @@ -454,7 +454,7 @@ is_hostname (const char *str) point = split; while (*point) - if (g_regex_match_simple ("^(?!-)[a-z0-9-]{1,63}(?