ソースを参照

Cherry-pick "METADATA: Fix unsetting "cloakhost""

Christoph Biedl 2 年 前
コミット
5f808b8f3e

+ 28 - 0
debian/patches/0020-METADATA-Fix-unsetting-cloakhost.patch

@@ -0,0 +1,28 @@
+From f9959d90deb34ddb0b86f91b51dee5ff50997de2 Mon Sep 17 00:00:00 2001
+From: Alexander Barton <alex@barton.de>
+Date: Sun, 17 Mar 2024 15:55:39 +0100
+Subject: [PATCH 20/20] METADATA: Fix unsetting "cloakhost"
+
+Correctly re-generate the "cloaked hostname" when removing the
+"cloakhost" using an empty string by passing down NULL instead of the
+empty string, which results in protocol violations (for example on
+WHOIS).
+
+(cherry picked from commit 1118b0e77ca961a7b082f90cb124210eca8fb6bd)
+---
+ src/ngircd/irc-metadata.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/src/ngircd/irc-metadata.c
++++ b/src/ngircd/irc-metadata.c
+@@ -72,7 +72,9 @@
+ 	}
+ 
+ 	if (strcasecmp(Req->argv[1], "cloakhost") == 0) {
+-		Client_UpdateCloakedHostname(target, prefix, Req->argv[2]);
++		/* Set or remove a "cloaked hostname". */
++		Client_UpdateCloakedHostname(target, prefix,
++					     *Req->argv[2] ? Req->argv[2] : NULL);
+ 		if (Client_Conn(target) > NONE && Client_HasMode(target, 'x'))
+ 			IRC_WriteStrClientPrefix(target, prefix,
+ 					RPL_HOSTHIDDEN_MSG, Client_ID(target),

+ 1 - 0
debian/patches/series

@@ -17,5 +17,6 @@
 0017-S2S-TLS-Convert-SSL.txt-to-Markdown-and-update-infor.patch
 0018-S2S-TLS-Add-notice-to-INSTALL.patch
 0019-S2S-TLS-Fix-make-check-in-separate-build-directory.patch
+0020-METADATA-Fix-unsetting-cloakhost.patch
 
 fix-typos.patch