#12 DCC CTCP-parsing problem

open-later
nobody
None
3
2012-04-05
2002-08-24
Anonymous
No

when ShadowIRC first receives the DCC request before accepting it or putting it in the pending list, it of course must parse it. but it fails with filenames that have spaces in them and are wrapped in double-quote marks (").

example CTCP: DCC SEND "Foo Bar" IPAsInteger PortAsInteger SizeAsInteger

ShadowIRC should read in:

name="Foo Bar"
IP=IPAsInteger
port=PortAsInteger
size=SizeAsInteger

instead, it reads:

name="Foo
IP=Bar"
port=IPAsInteger
size=PortAsInteger

this problem is only exhibited with filenames that have spaces. other filenames (like Foo_Bar) are parsed correctly.

--Mac-arena the Bored Zo (alias fGewA)

Discussion

  • John Bafford
    John Bafford
    2002-09-04

    Logged In: YES
    user_id=50276

    I want to recall spaces in the filename as being a violation
    of the DCC protocol. I'll look into this, though. What client
    emits quoted filenames like that?

     
  • Sean McGovern
    Sean McGovern
    2003-01-30

    • priority: 5 --> 3
    • assigned_to: nobody --> smcgovern
    • status: open --> open-later
     
  • Sean McGovern
    Sean McGovern
    2003-01-30

    Logged In: YES
    user_id=60475

    This will be looked at soon. However, if indeed it is a
    protocol violation, how should we proceed?

     
  • John Bafford
    John Bafford
    2003-01-30

    Logged In: YES
    user_id=50276

    I'm fairly certain this is a protocol violation. IIRC,
    spaces should be encoded as underscores. (This is what
    ShadowIRC does; see DCC.c:880-886.)

    In the interests of interopability, we should probably
    "correctly" parse bogus DCC commands, however unless the DCC
    specification has changed, we will not create these invalid
    filenames.

    How is a quote within the quotes encoded?

     
  • Sean McGovern
    Sean McGovern
    2012-04-05

    • assigned_to: smcgovern --> nobody