DCC CTCP-parsing problem
Status: Alpha
Brought to you by:
dshadow
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)
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?
Logged In: YES
user_id=60475
This will be looked at soon. However, if indeed it is a
protocol violation, how should we proceed?
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?