bug in Safari cookie handling

1 view
Skip to first unread message

infowolfe

unread,
Jun 14, 2009, 4:53:10 AM6/14/09
to rssdler
--- rssdler.py 2008-08-11 19:48:24.000000000 -0700
+++ rssdler.fixed 2009-06-14 01:51:11.085078087 -0700
@@ -500,7 +500,7 @@
elif keyText == 'value': d['value'] = valueText
else:
if 5 == len(set(d.keys()).intersection
(('domain','path','expires','name','value'))):
- d['dspec'] = str(d['host'].startswith('.')).upper()
+ d['dspec'] = str(d['domain'].startswith('.')).upper()
s.writelines( "%(domain)s\t%(dspec)s\t%(path)s\tFALSE\t%
(expires)s\t%(name)s\t%(value)s\n" % d)
else:
logging.error('there was an error parsing the cookie with
these values\n%s' % d)


You don't use the 'host' key anywhere else, so this patch prevents the
KeyError when using a Safari Cookies.plist.

The patch is against current svn, but anybody wishing to fix this can
simply edit line 503 and replace 'host' with 'domain' in rssdler.py in
versions 0.4.0a and above.
Reply all
Reply to author
Forward
0 new messages