Fix hiding legal strings on at. subdomains

This commit is contained in:
Petr Písař 2020-01-15 12:12:00 +01:00
parent c01b791bdf
commit e770da38b1
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From 9a94411d91276c3d9f4319f89900600da9533b73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 15 Jan 2020 12:00:14 +0100
Subject: [PATCH] Make sx. hide string more specific
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit caa27b0675e171fe85c043d0199bfe77fddb23b9 broke displaying
results for at. subdomains because "%" lines exists in their outputs.
This patch changes the sx. start hide string to be more specific on
the expense that sx. output will contain a single "%" line.
More thorough fix would require changing the hiding algorithm to
either require prefix for each hidden line or to bind the strings to
their respective domains or servers.
Fixes <https://github.com/rfc1036/whois/issues/84>.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
data.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data.h b/data.h
index 82530da..718f40a 100644
--- a/data.h
+++ b/data.h
@@ -72,7 +72,7 @@ const char *hide_strings[] = {
"% The WHOIS service offered by EURid", "% of the database", /* eu */
"Access to .IN WHOIS information", NULL, /* in */
"access to .in whois information", NULL, /* in registar */
- "%", NULL, /* sx */
+ "% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal", NULL, /* sx */
"The Service is provided so that you may look", "We may discontinue",/*vu*/
"NeuStar, Inc., the Registry Administrator for .US", NULL,
--
2.21.1

View File

@ -11,11 +11,14 @@
Name: whois
Version: 5.5.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Improved WHOIS client
License: GPLv2+
URL: http://www.linux.it/~md/software/
Source0: http://ftp.debian.org/debian/pool/main/w/%{name}/%{name}_%{version}.tar.xz
# Fix hiding legal strings on at. subdomains, proposed to the upstream,
# bug #1791035, <https://github.com/rfc1036/whois/issues/84>
Patch0: whois-5.5.4-Make-sx.-hide-string-more-specific.patch
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: gettext
@ -84,6 +87,7 @@ whois tools messages translated into different natural languages.
%prep
%setup -q -n %{name}
%patch0 -p1
%build
%{make_build} CONFIG_FILE="%{_sysconfdir}/%{cfgfile}" \
@ -139,6 +143,9 @@ fi
%endif
%changelog
* Wed Jan 15 2020 Petr Pisar <ppisar@redhat.com> - 5.5.4-2
- Fix hiding legal strings on at. subdomains (bug #1791035)
* Fri Jan 03 2020 Petr Pisar <ppisar@redhat.com> - 5.5.4-1
- 5.5.4 bump