* [PATCH] ip_conntrack_irc, allowance for quoted filenames
@ 2003-05-12 1:33 Rene Herman
0 siblings, 0 replies; 3+ messages in thread
From: Rene Herman @ 2003-05-12 1:33 UTC (permalink / raw)
To: netfilter-devel; +Cc: Rene Herman, Harald Welte
[ please keep me in CC, not subscribed ]
When the irssi (www.irssi.org) IRC client is asked to DCC SEND a file
with a filename containing spaces, it does so by leaving the spaces
intact and quoting the filename (""). ip_conntrack_irc.c:parse_dcc()
however can't handle the embedded spaces.
I haven't checked other clients but I assume they might do the same. Is
the attached hack (against 2.4.20) acceptable? Should this be solved
differently and/or elsewhere?
Rene.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ip_conntrack_irc, allowance for quoted filenames
@ 2003-05-12 1:38 Rene Herman
2003-05-12 7:53 ` Harald Welte
0 siblings, 1 reply; 3+ messages in thread
From: Rene Herman @ 2003-05-12 1:38 UTC (permalink / raw)
To: netfilter-devel; +Cc: Rene Herman, Harald Welte
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
Resend, this time _with_ patch ...
[ please keep me in CC, not subscribed ]
When the irssi (www.irssi.org) IRC client is asked to DCC SEND a file
with a filename containing spaces, it does so by leaving the spaces
intact and quoting the filename (""). ip_conntrack_irc.c:parse_dcc()
however can't handle the embedded spaces.
I haven't checked other clients but I assume they might do the same. Is
the attached hack (against 2.4.20) acceptable? Should this be solved
differently and/or elsewhere?
Rene.
[-- Attachment #2: linux-2.4.20-ip_conntrack_irc.diff --]
[-- Type: text/plain, Size: 568 bytes --]
--- linux-2.4.20/net/ipv4/netfilter/ip_conntrack_irc.c.orig 2002-12-01 02:32:52.000000000 +0100
+++ linux-2.4.20/net/ipv4/netfilter/ip_conntrack_irc.c 2003-05-12 02:10:01.000000000 +0200
@@ -82,6 +82,12 @@
ad_beg_p returns pointer to first byte of addr data
ad_end_p returns pointer to last byte of addr data */
{
+ /* handle quoted arguments containing spaces */
+ if (*data == '"')
+ /* at least 14: "\" AAAAAAAA P\1\n" */
+ while (*++data != '"')
+ if (data > data_end - 14)
+ return -1;
/* at least 12: "AAAAAAAA P\1\n" */
while (*data++ != ' ')
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ip_conntrack_irc, allowance for quoted filenames
2003-05-12 1:38 Rene Herman
@ 2003-05-12 7:53 ` Harald Welte
0 siblings, 0 replies; 3+ messages in thread
From: Harald Welte @ 2003-05-12 7:53 UTC (permalink / raw)
To: Rene Herman; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]
On Mon, May 12, 2003 at 03:38:16AM +0200, Rene Herman wrote:
> Resend, this time _with_ patch ...
>
> [ please keep me in CC, not subscribed ]
>
> When the irssi (www.irssi.org) IRC client is asked to DCC SEND a file
> with a filename containing spaces, it does so by leaving the spaces
> intact and quoting the filename (""). ip_conntrack_irc.c:parse_dcc()
> however can't handle the embedded spaces.
Thanks a lot, I will include your patch.
This is, however, an irssi extension. the DCC specification does not
include support for spaces in filenames, neither does the ircII
implementation.
> I haven't checked other clients but I assume they might do the same. Is
> the attached hack (against 2.4.20) acceptable? Should this be solved
> differently and/or elsewhere?
no, it's perfectly fine.
> Rene.
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-12 7:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-12 1:33 [PATCH] ip_conntrack_irc, allowance for quoted filenames Rene Herman
-- strict thread matches above, loose matches on Subject: below --
2003-05-12 1:38 Rene Herman
2003-05-12 7:53 ` Harald Welte
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.