From 01e5f0ffb0b4efabdca1c5e6a3f41bfb7f0d9f8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Sun, 12 Dec 2021 10:11:43 +0100 Subject: [PATCH] location-importer: Replace "UK" with "GB" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Apparently, LACNIC does not to proper input validation on supplied country codes, so people can use "UK", while they probably mean "GB" instead. Signed-off-by: Peter Müller Signed-off-by: Michael Tremer --- src/python/location-importer.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/python/location-importer.in b/src/python/location-importer.in index 4373e41..118b0de 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -734,6 +734,10 @@ class CLI(object): # ... but keep this list distinct... continue + # When people set country codes to "UK", they actually mean "GB" + if val == "UK": + val = "GB" + inetnum[key].append(val) # Skip empty objects -- 2.39.5