Midori segfaults on adding IsraelList to Adblock

Bug #1531585 reported by RamiK(*_-_*)RamiK
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Committed
High
Unassigned

Bug Description

about:version:

Command line midori
Midori 0.5.11 ((null)) Midori
GTK+ 2.24.29 (2.24.25) Glib 2.46.2 (2.42.1)
WebKitGTK+ 2.4.9 (2.4.8) libSoup 2.52.2
cairo 1.14.4 (1.14.0) libnotify No
gcr 3.18.0 granite No
Platform X11; Linux x86_64
Identification Mozilla/5.0 (X11; Linux) AppleWebKit/538.15 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/538.15 Midori/0.5
Video Formats H264 [x] Ogg Theora [x] WebM [x]

Netscape Plugins:

Gnome Shell Integration This plugin provides integration with Gnome Shell for live extension enabling and disabling. It can be used only by extensions.gnome.org
iTunes Application Detector This plug-in detects the presence of iTunes when opening iTunes Store URLs in a web page with Firefox.

Replicate(also attached):
#!/bin/sh
mv ~/.config/midori ~/.config/midori-bak;
mkdir ~/.config/midori; mkdir ~/.config/midori/extensions;mkdir ~/.config/midori/extensions/libadblock.so;
touch ~/.config/midori/config; touch ~/.config/midori/extensions/libadblock.so/config;
echo "[extensions]" > ~/.config/midori/config; echo "libadblock.so=true" >> ~/.config/midori/config; echo "[settings]" > ~/.config/midori/extensions/libadblock.so/config; echo "filters=https://easylist-downloads.adblockplus.org/israellist+easylist.txt;" >> ~/.config/midori/extensions/libadblock.so/config;

midori
#Segmentation fault
#eof

Related branches

Revision history for this message
RamiK(*_-_*)RamiK (ramkromberg) wrote :
gue5t gue5t (gue5t)
Changed in midori:
status: New → Confirmed
Revision history for this message
gue5t gue5t (gue5t) wrote :

It looks like this is a result of the modification date in that list being in the format "06/01/16 10:56". extensions/adblock/updater.vala has logic to check for '-' or '.' separators to find a numeric date string but not '/', and assumes that any string without either of those two characters will have three space-separated fields. This one doesn't, so it crashes.

I'm not sure where one finds detailed documentation on the Adblock list format. We can fix the crash but I don't know which date formats we should actually accept, and whether this block list's date is malformed or correct.

Changed in midori:
milestone: none → 0.5.12
importance: Undecided → High
Revision history for this message
RamiK(*_-_*)RamiK (ramkromberg) wrote :

While the specifications don't describe a required format per-say, easylist been very consistent with their date format across all their lists so I think you should reject the line entry rather than parse it. I'll inform the list maintainer about using the correct date-format regardless.

Anyhow, catching exceptions while parsing text files (or any user input really) seems the obvious approach to me regardless ;)

Revision history for this message
RamiK(*_-_*)RamiK (ramkromberg) wrote :

I've raised the issue with the list's maintainer: https://github.com/ABPIsrael/EasyListHebrew/issues/72

Revision history for this message
RamiK(*_-_*)RamiK (ramkromberg) wrote :

The list maintainer fixed the date signature on his end but the bug still persists.

That's to say, when inserting the corrected filter list ( https://raw.githubusercontent.com/ABPIsrael/EasyListHebrew/master/EasyListHebrew.txt ), Midori now won't crush right away and will actually use the filter properly.

However, after closing Midori, when trying to restart it, it segfaults.

So, this one seems a little tricky...

gue5t gue5t (gue5t)
tags: added: adblock
gue5t gue5t (gue5t)
Changed in midori:
status: Confirmed → In Progress
gue5t gue5t (gue5t)
Changed in midori:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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