ktorrent fails to unzip peerguardian filter file

Bug #1207589 reported by Scott Testerman on 2013-08-02
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
KTorrent
Fix Released
Medium
ktorrent (Ubuntu)
Undecided
Unassigned

Bug Description

When using a PeerGuardian Filter File in KTorrent ( enable IP Filter plugin, then Configure > IP Filter ) the filter is downloaded, but still cannot be extracted by KTorrent. An upstream bug report finds the same thing I do: downloading and unzipping the file manually, then pointing KTorrent to the resulting file, will result in success. It appears the error may have been fixed by an updated kdelibs, rather than in KTorrent itself. Nonetheless, it's a regression in KTorrent functionality, as it worked in Quantal.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: ktorrent 4.3.1-1
ProcVersionSignature: Ubuntu 3.8.0-27.40-generic 3.8.13.4
Uname: Linux 3.8.0-27-generic x86_64
NonfreeKernelModules: fglrx wl
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Thu Aug 1 22:05:52 2013
InstallationDate: Installed on 2013-08-01 (1 days ago)
InstallationMedia: Kubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: ktorrent
UpgradeStatus: No upgrade log present (probably fresh install)

Hello, with version 4.3.0 this wasn't present.
After upgrading to 4.3.1, when ktorrent tries to download an IP filter file from (for example) the default location "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz" it successfully downloads the file but does not decompress it.

Reproducible: Always

Steps to Reproduce:
1. KTorrent downloads the IP filter list
2. It "forgets" to decompress (gunzip) it
3. It renames(?) the file to level1.txt but the file is still compressed
Actual Results:
KTorrent shows an error message.

If I manually go to the ~/.kde4/share/apps/ktorrent/ and rename the level1.txt file to level1.txt.gz and do `gunzip level1.txt.gz` the file gets decompressed and ktorrent recognizes it as valid file.

I attach a screenshot of the error message and what the level1.txt file looks like before doing my trick said above.

Created attachment 77345
snapshot of the error.png

Seems to work fine here

I get the same error-popup after downloading from the default location (didn't try other sources). Btw the level1.txt file gets deleted after confirming the popup-message.

(In reply to comment #3)
> Btw the level1.txt file gets deleted after confirming the popup-message.
Yup, same here. I forgot to mention that in my description message above.

I cannot update ipfilter list, getting following error message:
"There are no IP addresses to convert in /home/user/.kde4/share/apps/ktorrent/level1.txt"

Should I create new bug report or is it connected to this bug?

(In reply to comment #5)
> Should I create new bug report or is it connected to this bug?
This is the same bug yes, see the screenshot in comment 1.

Good to see I wasn't the only one getting this issue.

Must be the file type detection which is going wrong and thinking it is a text file, while it is a zip file.

Git commit cb643c530b0b8a906032f0f2d8947a4cee6553bc by Joris Guisson.
Committed on 11/03/2013 at 19:51.
Pushed by guisson into branch 'master'.

Use file contents to figure out which type of blocklist we are dealing with in IP filter

M +1 -0 ChangeLog
M +16 -18 plugins/ipfilter/downloadandconvertjob.cpp

http://commits.kde.org/ktorrent/cb643c530b0b8a906032f0f2d8947a4cee6553bc

I applied this patch to the released ktorrent-4.3.1. The behaviour described above is unchanged. The bug still is not fixed!

(In reply to comment #9)
> I applied this patch to the released ktorrent-4.3.1. The behaviour described
> above is unchanged. The bug still is not fixed!
This is not entirely true.

The supplied patch works, BUT only for ZIP archive formats.
So if you select to use http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=zip it will work. Although if you select archiveformat=gz or 7z it won't work showing an error window which says: "Cannot determine file type of http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=gz"

I allow myself to change the bug status back to unconfirmed.

(In reply to comment #10)
> The supplied patch works, BUT only for ZIP archive formats.
> So if you select to use
> http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=zip
> it will work.
It doesn't work for me. Although the error message after downloading is different:
"Cannot find blocklist in zip file /home/vootey/.kde4/share/apps/ktorrent/level1.zip."

> Although if you select archiveformat=gz or 7z it won't work
> showing an error window which says: "Cannot determine file type of
> http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=gz"
For me the same old error message:
"There are no IP addresses to convert in /home/vootey/.kde4/share/apps/ktorrent/level1.txt"

*** This bug has been confirmed by popular vote. ***

I have tested both the gz and zip urls, they both work on the master branch.

Hi,
this error still occours.

KTorrent Version 4.3.1
Archlinux 64bit

It happens with both:

http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=zip

and

http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=gz

Greetings,
Andy

Snap. v4.3.1 still has the bug, Kubuntu 13.04.

Sill happens Version 4.3.1 on Fedora 18.

Joris, which version will the master branch use when it is released ? Please set the "Version Fixed In" field to avoid confusions.

OK, it seems I can reproduce it now to, probably since my upgrade to raring.

As a workaround you can unzip the blocklist locally and enter the filepath to the text-blocklist in ktorrent

Git commit 09421b0222c7552ddcfecbd8c05d8c069a05ba5f by Joris Guisson.
Committed on 01/08/2013 at 10:51.
Pushed by guisson into branch 'master'.

Fix gzip not working in ipfilter plugin due to wrong mimetype

M +1 -0 ChangeLog
M +15 -3 plugins/ipfilter/downloadandconvertjob.cpp

http://commits.kde.org/ktorrent/09421b0222c7552ddcfecbd8c05d8c069a05ba5f

gzip is back to normal, apparently the mimetype changed from application/x-gzip to application/gzip in some recent version of KDE.

zip is also working back, without any modifications. Not sure what changed, must be a bugfix in kdelibs which fixed it.

Git commit 3dfcbeb9765e99f9b99951134b17268eb7a617d2 by Joris Guisson.
Committed on 01/08/2013 at 11:19.
Pushed by guisson into branch '4.3'.

Backport ipfilter extraction fixes from master branch to 4.3 branch

M +3 -0 ChangeLog
M +5 -17 plugins/ipfilter/downloadandconvertjob.cpp

http://commits.kde.org/ktorrent/3dfcbeb9765e99f9b99951134b17268eb7a617d2

Changed in ktorrent:
importance: Unknown → Medium
status: Unknown → Fix Released

I am still receiving this error.
Cannot determine file type of http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz

Using developmental branch pulled 13/08/02
Qt: 4.8.1
KDE Development Platform: 4.8.5 (4.8.5)
KTorrent: 4.3dev

Fedora 19 KDE x64, Ktorrent 4.3.1

For completeness... the following URL's error out:

http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=7z
http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz
http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=zip
http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=

Joris, whats KTorrent's release schedule like? 4.3.1 was was in January, 4.3.0 was in September... no offense but 4 months for a bug fix release is kind of.... unheard of. And we're now at 7 months without a 4.3.2 release. So can you tag a 4.3.2 release so this, and other, bugfixes can be pushed to users? Release early, release often.

Same problem here
Kubuntu 13.04 - 32bit with KTorrent 4.3.1

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ktorrent (Ubuntu):
status: New → Confirmed

Still not working in Kubuntu packaged KDE 4.11 from Backports PPA. According to comment 21 from the upstream bug (comment 24 as linked here) the problem may have been due to changes in KDE, but those fixes do not appear to have made it into the Kubuntu packaging.

KTorrent 4.3.1, Kubuntu 13.04, KDE 4.11.1, x64

I'm not sure I understand why the error message differs from what I'm seeing, and what I'm noticing is different from Phr33d0m's original post.

If I go into KTorrent's Settings -> IP Filter, and enable the "Use PeerGuardian filter", click the "Download/Convert" button, I get this familiar message:

"There are no IP addresses to convert in /home/user/.kde/share/apps/ktorrent/level1.txt"

However, if leave that error message visible and open the level1.txt file, I see a text file with 235,295 lines, and they seem valid, like:

SMSHoax FakeAV Fraud Trojan:1.179.144.98-1.179.144.98
Detected AP2P on TOT Public Co. proxy:1.179.147.2-1.179.147.2
Detected AP2P on ChinaNet Beijing proxy:1.202.96.52-1.202.96.52

So there does appear to be IP addresses in it, in contrast to the message.

After I click to dismiss the "error message", the level1.txt file gets deleted.

This is the URL for the IP filter file: http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz

So the error message doesn't seem to match what I'm seeing. Does this help in resolving this issue?

Michael,

As far as I can tell so far, this is the issue:

Your text editor probably realizes the text file is compressed and uncompresses it on the fly. This is an issue where KTorrent is handed a compressed file, and doesn't realize its compressed and tries to use it as-is. Leading to garbage input, which makes KTorrent think there's nothing valid.

What SHOULD happen is KTorrent realizes its compressed, passes it through the unzip de-compression utility. And then gets handed back the uncompressed version of the text file, which is valid input and everyone's happen.

here (arch 64 ktorrent 4.3.1 kde 4.11.2) bug is still present with the well known warning "There are no IP addresses to convert in XYZ"

compressed ip lists do get decompressed, but do not get loaded.

loading archives in formats that my system doesn't support, produces the same warning.

even if i decompress a list manually, ktorrent produces the same warning while loading it.

poet_imp (paul-lemmons) wrote :

Until it gets fixed here is what I am doing for a workaround:

In Ktorrent settings set url to:
http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=zip
Click download

Leave error message up
cd /home/<yourid>/.kde/share/apps/ktorrent/
unzip level1.zip

Dismiss error message
In Ktorrent settings set url to:
/home/<yourid>/.kde/share/apps/ktorrent/bt_level1.txt
Click download

I can confirm the same as previous comment here, arch 64 ktorrent 4.3.1 KDE 4.11.3.

It makes me suspicious that both us are using Arch. How does the KDE mime system works? How could it not be detecting the proper file type?

Nah, it's not just Arch. Still bust in Kubuntu's Ktorrent 4.3.1 using http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz which is fine on the command line after wget'ing :

$ file index.html\?list\=bt_level1
index.html?list=bt_level1: gzip compressed data, was "bt_level1.txt", from Unix, last modified: Mon Nov 25 04:11:48 2013, max compression

And using that file uncompressed in the dialogue works too.

Maybe the fixed version isn't being pushed to the repositories.

KTorrent 4.3.1 in KDE 4.11.3 to be precise.

Issue still present in Ktorrent 4.3.1 with KDE platform 4.12

Harald Sitter (apachelogger) wrote :

Closing in favor of upstream report.

The fix will be picked up in Kubuntu once a new KTorrent version was released.

Changed in ktorrent (Ubuntu):
status: Confirmed → Invalid

Still present in Opensuse 13.1 KDE 4.12.2 , ktorrent 4.3.1
If it is Fixed where did those fixes go?

From what I can see the fixed version has not yet been released. Please wait for KTorrent >= 4.3.2.

TIA

This issue still exist. And it has for about a year. Automatically downloading and converting still does not work. Manually converting does work. So, do we need to wait for a new version or can a patch just be pushed out?

I'm using: KTorrent 4.3.1; KDE Dev Platform 4.11.5

That's what I said, isn't it?

Hello!
I'm on debian sid with ktorrent 4.3.1-2 installed from a while. I never had this problem until recently, but ktorrent has not been upgraded. So, I guess it is a bug from a recent update of KDE (I'm on KDE 4.11.6-3)

michael (reeves-87) wrote :

The patched version of ktorrent has not been pushed as of the lastest 13.04 updates. No idea as to why.

Still not fixed in Ktorrent Version 4.3.1 (Using KDE Development Platform 4.12.95) which is in Ubuntu 14.04 LTS beta 2

The commit to fix this was six months ago, so it should surely have been picked up in all the downstreams by now ?

In Kubuntu 14.04 bug present without any changes>

==============================================
cat /home/tomasz/.kde/share/apps/ktorrent/log

niedz. mar 30 16:26:52 2014: Bound to ::
niedz. mar 30 16:26:52 2014: Cannot bind to port 0.0.0.0:6881 : Adres jest już w użyciu
niedz. mar 30 16:26:52 2014: Bound to TCP port 6881
niedz. mar 30 16:26:52 2014: Cannot open /home/tomasz/.kde/share/apps/ktorrent/groups : Nie ma takiego pliku ani katalogu
niedz. mar 30 16:26:52 2014: Failed to open /home/tomasz/.kde/share/apps/ktorrent/magnets : No such file or directory
niedz. mar 30 16:26:52 2014: Started update timer
niedz. mar 30 16:26:52 2014: Suppressing sleep
niedz. mar 30 16:26:52 2014: Qt Warning: Bus::open: Can not get ibus-daemon's address.
niedz. mar 30 16:26:52 2014: Qt Debug: IBusInputContext::createInputContext: no connection to ibus-daemon
niedz. mar 30 16:26:52 2014: Stopped update timer
niedz. mar 30 16:26:52 2014: Stopped suppressing sleep
niedz. mar 30 16:26:53 2014: No torrents to migrate found
niedz. mar 30 16:27:13 2014: Cannot open /home/tomasz/.kde/share/apps/ktorrent/level1.dat: No such file or directory
niedz. mar 30 16:27:13 2014: Cannot open /home/tomasz/.kde/share/apps/ktorrent/level1.dat: No such file or directory
niedz. mar 30 16:27:17 2014: Qt Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
niedz. mar 30 16:27:17 2014: Qt Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
niedz. mar 30 16:27:48 2014: Loading /home/tomasz/.kde/share/apps/ktorrent/level1.txt ...
niedz. mar 30 16:27:48 2014: Loaded 0 lines
niedz. mar 30 16:27:53 2014: Cannot open /home/tomasz/.kde/share/apps/ktorrent/level1.dat: No such file or directory

(In reply to comment #33)
> From what I can see the fixed version has not yet been released. Please wait
> for KTorrent >= 4.3.2.

^ autoquote

That was my point Harald. The fix was made half a year ago, but still not rolled out. Why, and how can we speed it up ?

I do not know, someone should like look into that ;)

netskaven (netskaven) wrote :

Bug is in Trusty yet

ktorrent -> 4.3.1

opensuse 13.1 .. kt 4.3.1 .. my filename is level1.txt .. but same issue as described above .. i wonder if KT is an active app ;-)

Still broken in Kubuntu 4.14.4. Clearly updates are not going out to distributions correctly.

(In reply to Tom Chiverton from comment #44)
> Still broken in Kubuntu 4.14.4. Clearly updates are not going out to
> distributions correctly.

You need to report with your distro. Here in Fedora 23 everything is working right.

Why is this marked invalid ?

Kubuntu 17.04 Zesty, ktorrent 4.3.1-5

The file from "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz" is being downloaded, but not ungzipped. Ktorrent says:

```
There are no IP addresses to convert in _USERNAME_SKIPPED_/.kde/share/apps/ktorrent/level1.txt
```

Changed in ktorrent (Ubuntu):
status: Invalid → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ktorrent - 5.1.0-2

---------------
ktorrent (5.1.0-2) unstable; urgency=medium

  * Team upload.
  * Upload to unstable.

 -- Pino Toscano <email address hidden> Tue, 05 Sep 2017 21:06:30 +0200

Changed in ktorrent (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.