From 420fff7ee6e9e0a053c662cd52f7a2c873db14fa Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Sat, 3 May 2025 19:07:58 +0200 Subject: [PATCH] Do not mangle RADB queries with IDN processing --- whois.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/whois.c b/whois.c index fe73f00..8bdac51 100644 --- a/whois.c +++ b/whois.c @@ -1265,6 +1265,12 @@ char *normalize_domain(const char *dom) } #if defined HAVE_LIBIDN || defined HAVE_LIBIDN2 + /* A leading ! means that this probably is a RADB query, so skip IDN + * processing because it would lower-case the command characters. + */ + if (*ret == '!') + return ret; + /* find the start of the last word if there are spaces in the query */ for (p = ret; *p; p++) if (*p == ' ')