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.
This commit is contained in:
Florian Bruhin 2015-05-13 23:46:22 +02:00
parent f8f8699ab8
commit 17fc6622bb

View File

@ -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