From 53d6b1dc3289b93c903136e3c9e55e54800a04c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <philipp@hoerist.com>
Date: Fri, 15 Feb 2019 15:04:50 +0100
Subject: [PATCH] Dont advertise urn:xmpp:hashes:1

Fixes #9514
---
 gajim/common/app.py            | 1 -
 gajim/common/jingle_session.py | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gajim/common/app.py b/gajim/common/app.py
index a021d51954..15b6f1187c 100644
--- a/gajim/common/app.py
+++ b/gajim/common/app.py
@@ -162,7 +162,6 @@ gajim_common_features = [
     nbxmpp.NS_CONFERENCE,
     nbxmpp.NS_CORRECT,
     nbxmpp.NS_EME,
-    nbxmpp.NS_HASHES,
     nbxmpp.NS_HASHES_2,
     nbxmpp.NS_HASHES_MD5,
     nbxmpp.NS_HASHES_SHA1,
diff --git a/gajim/common/jingle_session.py b/gajim/common/jingle_session.py
index 32d50d4a69..5f36b925b4 100644
--- a/gajim/common/jingle_session.py
+++ b/gajim/common/jingle_session.py
@@ -445,6 +445,8 @@ class JingleSession:
             if child.getName() == 'checksum':
                 hash_ = child.getTag('file').getTag(name='hash',
                                                     namespace=nbxmpp.NS_HASHES_2)
+                if hash_ is None:
+                    continue
                 algo = hash_.getAttr('algo')
                 if algo in nbxmpp.Hashes2.supported:
                     file_props = FilesProp.getFileProp(self.connection.name,
-- 
GitLab