From 17fc6622bb7fff2467855697dff6acd94615dfe8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 13 May 2015 23:46:22 +0200 Subject: [PATCH] Strip NUL bytes when loading history. This is a workaround so people can start qutebrowser again, but the real bug should be found and fixed... See #670. --- qutebrowser/browser/history.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qutebrowser/browser/history.py b/qutebrowser/browser/history.py index 90f2e5567..b3370d0c1 100644 --- a/qutebrowser/browser/history.py +++ b/qutebrowser/browser/history.py @@ -95,6 +95,12 @@ class WebHistory(QWebHistoryInterface): line)) continue atime, url = data + if atime.startswith('\0'): + log.init.warning( + "Removing NUL bytes from entry {!r} - see " + "https://github.com/The-Compiler/qutebrowser/issues/" + "670".format(data)) + atime = atime.lstrip('\0') # This de-duplicates history entries; only the latest # entry for each URL is kept. If you want to keep # information about previous hits change the items in