New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCC autoget stopped working #656

Closed
brunnerh opened this Issue Feb 20, 2017 · 24 comments

Comments

Projects
None yet
6 participants
@brunnerh

brunnerh commented Feb 20, 2017

When a DCC transfer is initiated by another party it does display the name and size of the file that is to be transferred, but then i always get "DCC no file offered by [name]". To make sure that the issue was not on the other end i used another client (pidgin) and it works just fine there.

If there is some debug information i could provide, let me know.

EDIT:
So the issue only appears to affect the autoget functionality if the file name contains spaces.
Version used: 1.0.1

@vague666

This comment has been minimized.

Member

vague666 commented Feb 20, 2017

Were both/either of the clients behind a firewall/router? If yes, were the ports forwarded as required? are the forwarded ports specified in irssi? does irssi know its external ip?
See
/set dcc_port specify a range, 5000 5010 is typical
/set dcc_own_ip which is the external/internet facing ip

@vague666

This comment has been minimized.

Member

vague666 commented Feb 20, 2017

Does the sending user have casefolded characters in the nick? Like \ or ^ etc, ie non a-zA-z0-9 characters?

@vague666

This comment has been minimized.

Member

vague666 commented Feb 20, 2017

Also, does /dcc show the connection?

@brunnerh

This comment has been minimized.

brunnerh commented Feb 20, 2017

The name is just alphanumeric.

/dcc shows:
<Name> GET: 0B of 12MB (0%) - 0.00kB/s - ETA (stalled) - <file>

@vague666

This comment has been minimized.

Member

vague666 commented Feb 20, 2017

And the ports? And ip? And router status?

@brunnerh

This comment has been minimized.

brunnerh commented Feb 20, 2017

Oh sorry, overlooked that. Will look into it.

@brunnerh

This comment has been minimized.

brunnerh commented Feb 20, 2017

Those port options were left at default, port wise only the lower ports should be rejected automatically.

I tried manually setting the dcc_own_ip to my public IPv6 address, but that did appear to change anything. My router is not an issue. I tried accessing my web server from outside the home network and that works just fine.

Previously DCC worked just fine, i updated my arch linux packages yesterday which might have something to do with it. Unfortunately i also changed my network configuration recently, but i am pretty sure there was a time frame in which i was using my new network configuration and an older irssi version and it worked.

I will check if the newest version works on another machine of mine and if not i will try to find out on which version i was. If it works there it probably was my network after all and i apologize in advance.

@brunnerh

This comment has been minimized.

brunnerh commented Feb 20, 2017

Alright, does not work on my other machine either, so probably not the network...

@brunnerh

This comment has been minimized.

brunnerh commented Feb 20, 2017

Upgrade log shows:
[2017-02-20 01:25] [ALPM] upgraded irssi (0.8.20-1 -> 1.0.1-1)

@brunnerh

This comment has been minimized.

brunnerh commented Feb 20, 2017

Downgraded to 0.8.21 on my primary machine and it works again.

@vague666

This comment has been minimized.

Member

vague666 commented Feb 20, 2017

Ok, thanks for testing, the developers will have to take a look at it then

@brunnerh

This comment has been minimized.

brunnerh commented Feb 20, 2017

Thanks!

@kittey

This comment has been minimized.

kittey commented Feb 20, 2017

What happens if you type /dcc get when you get the file offer? And does the name of the offered file contain one or more spaces?

I also had problems receiving files after I upgraded to 1.0.0. Basically, autoget didn’t work for files with spaces in their names. Autoget worked for files with no spaces, and receiving files with spaces worked by manually typing /dcc get. When I went back to 0.8.20, autoget worked as expected.

@brunnerh brunnerh changed the title from DCC stopped working to DCC autoget stopped working Feb 21, 2017

@brunnerh

This comment has been minimized.

brunnerh commented Feb 21, 2017

I observe the same behaviour, /dcc get starts the transfer and if the file has no spaces it works with auto get.

@dequis

This comment has been minimized.

Member

dequis commented Feb 21, 2017

#453 broke this, somehow

@dequis

This comment has been minimized.

Member

dequis commented Feb 21, 2017

-	if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST,
-			    &nick, &fname))
+	if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST |
+			    PARAM_FLAG_STRIP_TRAILING_WS, &nick, &arg))
 		return;
 [...]
+       fname = cmd_get_quoted_param(&arg);

Old:

fname = "Screen Shot 2016-05-26 at 18.31.02.png"

New:

arg = "Screen Shot 2016-05-26 at 18.31.02.png"
fname = "Screen"

(rr) bt
#0  cmd_get_quoted_param (data=0x7ffd9201e388) at commands.c:488
#1  0x0000558e53f531f3 in cmd_dcc_receive (data=<optimized out>, accept_func=0x558e53f52700 <dcc_get_connect>, pasv_accept_func=0x558e53f51fe0 <dcc_get_passive>) at dcc-get.c:559
#2  0x0000558e53f72692 in signal_emit_real (rec=rec@entry=<Signal 233>, params=params@entry=3, va=va@entry=0x7ffd9201e460, first_hook=<optimized out>) at signals.c:242
#3  0x0000558e53f72c6d in signal_emit (signal=signal@entry=0x558e550f4ee0 "command dcc get", params=params@entry=3) at signals.c:286
#4  0x0000558e53f5ba42 in command_runsub (cmd=0x558e53f94511 "dcc", data=0x558e550f5070 "GET dx3 Screen Shot 2016-05-26 at 18.31.02.png", server=0x558e550e4250, item=0x0) at commands.c:329
#5  0x0000558e53f72692 in signal_emit_real (rec=rec@entry=<Signal 221>, params=params@entry=2, va=va@entry=0x7ffd9201e620, first_hook=<optimized out>) at signals.c:242
#6  0x0000558e53f72c6d in signal_emit (signal=signal@entry=0x558e53f94509 "command dcc", params=params@entry=2) at signals.c:286
#7  0x0000558e53f54e97 in sig_dcc_request (dcc=0x558e550f5110, nickaddr=<optimized out>) at dcc-autoget.c:75
#8  0x0000558e53f72692 in signal_emit_real (rec=rec@entry=<Signal 239>, params=params@entry=2, va=va@entry=0x7ffd9201e860, first_hook=<optimized out>) at signals.c:242
#9  0x0000558e53f72c6d in signal_emit (signal=signal@entry=0x558e53f88cc2 "dcc request", params=params@entry=2) at signals.c:286
#10 0x0000558e53f52f71 in ctcp_msg_dcc_send (server=0x558e550e4250, data=<optimized out>, nick=<optimized out>, addr=0x558e550e7565 "~dx@...", target=0x558e550f4dc0 "dx2", chat=0x0) at dcc-get.c:525
#11 0x0000558e53f72692 in signal_emit_real (rec=rec@entry=<Signal 232>, params=params@entry=6, va=va@entry=0x7ffd9201ea60, first_hook=<optimized out>) at signals.c:242
#12 0x0000558e53f72c6d in signal_emit (signal=signal@entry=0x558e550f50b0 "ctcp msg dcc send", params=params@entry=6) at signals.c:286
#13 0x0000558e53f4e9b3 in ctcp_msg_dcc (server=0x558e550e4250, data=0x558e550f4dca "SEND \"Screen Shot 2016-05-26 at 18.31.02.png\" [...] 33137 972605", nick=0x558e550e7561 "dx3", addr=0x558e550e7565 "~dx@...",
    target=0x558e550f4dc0 "dx2", chat=0x0) at dcc.c:371

@dequis dequis added the bug label Feb 21, 2017

@ailin-nemui

This comment has been minimized.

@LemonBoy

This comment has been minimized.

Member

LemonBoy commented Feb 21, 2017

Hmm, I guess that quoting the filename is enough to fix the problem at hand.

@kittey

This comment has been minimized.

kittey commented Feb 21, 2017

I guess that quoting the filename is enough to fix the problem at hand.

Is that a suggestion for a patch or a suggestion for users? If it’s the latter, I’m not sure how that would help me as a user because I have no control over what client the sender is using and what its capabilities are. So far I’ve only seen unquoted file names with spaces from various clients.

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Feb 21, 2017

it's a bug and we need to fix it

LemonBoy added a commit to LemonBoy/irssi that referenced this issue Feb 21, 2017

Quote the filename when dcc requests are auto accepted.
PR irssi#453 forces the user to quote the filenames given to /DCC commands
when they contain spaces but the autoget functionality didn't get
updated so the filename was always passed without quotes.

Closes irssi#656.
@LemonBoy

This comment has been minimized.

Member

LemonBoy commented Feb 21, 2017

Ok, my bad for not quoting the message I was answering to, this is of course a bug and the previous message was about how to solve the problem.
Please check if the referenced PR fixes the problem for you.

@dequis

This comment has been minimized.

Member

dequis commented Feb 21, 2017

I don't get the point of #453 though.

If I go back to 0.8.21 I can do /dcc get and /dcc send of filenames with spaces. /dcc get didn't require quotes, /dcc send did require them (because otherwise it would send multiple files). Passing a filename with quotes to /dcc get results in the same "no file offered" as 1.0 does with this bug with autoget, but for a different reason.

All that changed with that PR was requiring quotes for /dcc get, which doesn't provide new functionality over the previous situation, just consistency with /dcc send while breaking an old usage.

Wouldn't it be better to support both quoted and unquoted filenames in /dcc get? It's only taking one parameter with GETREST after all.

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Feb 21, 2017

we thought it would be more logical to be consistent in requiring quotes everywhere

@kittey

This comment has been minimized.

kittey commented Feb 24, 2017

Please check if the referenced PR fixes the problem for you.

It does.

ailin-nemui added a commit to ailin-nemui/irssi that referenced this issue Mar 7, 2017

@ailin-nemui ailin-nemui referenced this issue Mar 7, 2017

Merged

fix dcc get #667

ailin-nemui added a commit to ailin-nemui/irssi that referenced this issue Mar 7, 2017

ailin-nemui added a commit that referenced this issue Mar 8, 2017

ailin-nemui added a commit to ailin-nemui/irssi that referenced this issue Dec 7, 2017

Merge pull request irssi#667 from ailin-nemui/fix-dcc-get
fix dcc get

fixes irssi#656
(cherry picked from commit d57c64a)

@ailin-nemui ailin-nemui added this to the 1.0.2 milestone Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment