changeset e0de4f6d0d18 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=e0de4f6d0d18
description: [Aлекс]. Fix time string encoding in the russian windows(cp1251).
diffstat:
src/conversation_textview.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r d3368ce04285 -r e0de4f6d0d18 src/conversation_textview.py
--- a/src/conversation_textview.py Mon Oct 29 15:11:16 2012 +0100
+++ b/src/conversation_textview.py Mon Sep 03 22:02:07 2012 +0400
@@ -1334,7 +1334,7 @@
timestamp_str = helpers.from_one_line(timestamp_str)
format_ += timestamp_str
tim_format = time.strftime(format_, tim)
- if locale.getpreferredencoding() != 'KOI8-R':
+ if locale.getpreferredencoding() not in ('KOI8-R', 'cp1251'):
# if tim_format comes as unicode because of day_str.
# we convert it to the encoding that we want (and that is utf-8)
tim_format = helpers.ensure_utf8_string(tim_format)
changeset 734d02e7be50 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=734d02e7be50
description: prevent traceback when a wrong certificate is being checked. Fixes #7242
diffstat:
src/common/check_X509.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 1571a300a583 -r 734d02e7be50 src/common/check_X509.py
--- a/src/common/check_X509.py Sat Oct 06 19:07:48 2012 +0200
+++ b/src/common/check_X509.py Mon Oct 08 11:14:47 2012 +0200
@@ -133,7 +133,12 @@
for i in range(0, cnt):
ext = cert.get_extension(i)
if ext.get_short_name() == 'subjectAltName':
- r = _parse_asn1(ext.get_data())
+ try:
+ r = _parse_asn1(ext.get_data())
+ except:
+ log.error('Wrong data in certificate: subjectAltName=%s' % \
+ ext.get_data())
+ continue
if 'otherName' in r:
if oid_xmppaddr in r['otherName']:
for host in r['otherName'][oid_xmppaddr]: