-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
From @GoogleCodeExporter on May 20, 2015 16:39
I recently discovered a bug in crankd's handling of characters outside of
standard ASCII when it's parsing the userdata in the notification.
replace the line under:
for k in [ 'info', 'key' ]:
if k in kwargs and kwargs[k]:
with:
child_env['CRANKD_%s' % k.upper()] = str(kwargs[k])
except Exception:
child_env['CRANKD_%s' % k.upper()] = kwargs[k].encode('utf-8')
replace the line under:
if 'user_info' in kwargs:
for k, v in kwargs['user_info'].items():
with:
try:
child_env[create_env_name(k)] = str(v)
except Exception:
child_env[create_env_name(k)] = v.encode('utf-8')
This should fix the problem. I've been running several foreign characters
through crankd to test (such as ë, é) and it hasn't failed.
Original issue reported on code.google.com by [email protected] on 9 Jan 2010 at 7:07
Copied from original issue: #4