Your message dated Wed, 28 Oct 2026 18:12:24 +0000
with message-id <[email protected]>
and subject line Bug#1120756: Removed package(s) from unstable
has caused the Debian Bug report #897426,
regarding Unix pathnames being misinterpreted as commands
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
897426: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897426
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: hexchat
Version: 2.14.1-2
Tags: patch

If I try to paste output into hexchat, it will attempt to interpret any
unix pathnames as IRC commands.  For example:

   [CC]    t_truncate_self
/bin/bash ../libtool --quiet --tag=CC --mode=link gcc t_truncate_self.c -o 
t_truncate_self -g -O2 -g -O2 -DDEBUG  -I../include -DVERSION=\"1.1.1\" 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall 
-DHAVE_FALLOCATE   -lattr /usr/lib/libhandle.la -lacl -lpthread   
../lib/libtest.la
libtool:   error: cannot find the library '/usr/lib/libhandle.la' or unhandled 
argument '/usr/lib/libhandle.la'

will not paste the second line as text to the person I'm having a
conversation with; rather it will attempt to interpret the second line
as a command, and the conversation gets derailed with missing lines.

Hexchat used to have code to detect unix pathnames, but it's currently
commented out.  I've written and lightly tested a better heuristic --
IRC commands do not contain a /, so if we see a / before we see a space,
we can infer this is not an IRC command.

This is a superset of the current test for "//" at the beginning of
a string, so delete that check as well.

Description: Don't interpret unix pathnames as commands
 Replace the list of common unix pathnames with a simpler heuristic;
 if there are two '/' characters before there is a ' ', this cannot be an
 IRC command, so just send it to the server as text instead of a command.
Author: Matthew Wilcox <[email protected]>

--- hexchat-2.14.1.orig/src/common/outbound.c
+++ hexchat-2.14.1/src/common/outbound.c
@@ -4852,6 +4852,9 @@
 static int
 handle_user_input (session *sess, char *text, int history, int nocommand)
 {
+       char cmd_char = prefs.hex_input_command_char[0];
+       unsigned int i;
+
        if (*text == '\0')
                return 1;
 
@@ -4859,50 +4862,27 @@
                history_add (&sess->history, text);
 
        /* is it NOT a command, just text? */
-       if (nocommand || text[0] != prefs.hex_input_command_char[0])
+       if (nocommand || text[0] != cmd_char)
        {
                handle_say (sess, text, TRUE);
                return 1;
        }
 
-       /* check for // */
-       if (text[0] == prefs.hex_input_command_char[0] && text[1] == 
prefs.hex_input_command_char[0])
-       {
-               handle_say (sess, text + 1, TRUE);
-               return 1;
-       }
-
-#if 0 /* Who would remember all this? */
-       if (prefs.hex_input_command_char[0] == '/')
+       /*
+        * There are no commands with an embedded /, so if we see one before
+        * we see a space, assume somebody's pasting a unix pathname or
+        * similar.  It can't be a command.
+        */
+       for (i = 1; text[i]; i++)
        {
-               int i;
-               const char *unix_dirs [] = {
-                       "/bin/",
-                       "/boot/",
-                       "/dev/",
-                       "/etc/",
-                       "/home/",
-                       "/lib/",
-                       "/lost+found/",
-                       "/mnt/",
-                       "/opt/",
-                       "/proc/",
-                       "/root/",
-                       "/sbin/",
-                       "/tmp/",
-                       "/usr/",
-                       "/var/",
-                       "/gnome/",
-                       NULL
-               };
-               for (i = 0; unix_dirs[i] != NULL; i++)
-                       if (strncmp (text, unix_dirs[i], strlen 
(unix_dirs[i]))==0)
-                       {
-                               handle_say (sess, text, TRUE);
-                               return 1;
-                       }
+               if (text[i] == cmd_char)
+               {
+                       handle_say (sess, text, TRUE);
+                       return 1;
+               }
+               if (text[i] == ' ')
+                       break;
        }
-#endif
 
        return handle_command (sess, text + 1, TRUE);
 }

--- End Message ---
--- Begin Message ---
Version: 2.16.2-1+rm

Dear submitter,

as the package hexchat has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1120756

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to