summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doap.xml7
-rw-r--r--slixmpp/__init__.py16
-rw-r--r--slixmpp/version.py4
3 files changed, 19 insertions, 8 deletions
diff --git a/doap.xml b/doap.xml
index 2a8a2379..ed76b55d 100644
--- a/doap.xml
+++ b/doap.xml
@@ -1027,5 +1027,12 @@
<file-release rdf:resource="https://lab.louiz.org/poezio/slixmpp/-/archive/slix-1.8.0/slixmpp-slix-1.8.0.tar.gz"/>
</Version>
</release>
+ <release>
+ <Version>
+ <revision>1.8.1</revision>
+ <created>2022-03-20</created>
+ <file-release rdf:resource="https://lab.louiz.org/poezio/slixmpp/-/archive/slix-1.8.1/slixmpp-slix-1.8.1.tar.gz"/>
+ </Version>
+ </release>
</Project>
</rdf:RDF>
diff --git a/slixmpp/__init__.py b/slixmpp/__init__.py
index 403c9299..a4796d78 100644
--- a/slixmpp/__init__.py
+++ b/slixmpp/__init__.py
@@ -4,14 +4,18 @@
# This file is part of Slixmpp.
# See the file LICENSE for copying permission.
import logging
+from os import getenv
logging.getLogger(__name__).addHandler(logging.NullHandler())
-# Use defusedxml if available
-try:
- import defusedxml
- defusedxml.defuse_stdlib()
-except ImportError:
- pass
+# Use defusedxml if wanted
+# Since enabling it can have adverse consequences for the programs using
+# slixmpp, do not enable it by default.
+if getenv('SLIXMPP_ENABLE_DEFUSEDXML', default='false').lower() == 'true':
+ try:
+ import defusedxml
+ defusedxml.defuse_stdlib()
+ except ImportError:
+ pass
from slixmpp.stanza import Message, Presence, Iq
from slixmpp.jid import JID, InvalidJID
diff --git a/slixmpp/version.py b/slixmpp/version.py
index 027f69e2..10864fc0 100644
--- a/slixmpp/version.py
+++ b/slixmpp/version.py
@@ -5,5 +5,5 @@
# We don't want to have to import the entire library
# just to get the version info for setup.py
-__version__ = '1.8.0'
-__version_info__ = (1, 8, 0)
+__version__ = '1.8.1'
+__version_info__ = (1, 8, 1)