bugfix: allow PLAIN or ANONYMOUS authentication in server mode
This commit is contained in:
parent
243328f44a
commit
98bf506ab1
@ -23,4 +23,4 @@ from pyngus.link import SenderLink, SenderEventHandler
|
||||
from pyngus.sockets import read_socket_input
|
||||
from pyngus.sockets import write_socket_output
|
||||
|
||||
VERSION = (2, 0, 1) # major, minor, fix
|
||||
VERSION = (2, 0, 2) # major, minor, fix
|
||||
|
@ -270,14 +270,14 @@ class Connection(Endpoint):
|
||||
if mechs:
|
||||
self.pn_sasl.mechanisms(mechs)
|
||||
else:
|
||||
# new Proton SASL configuration
|
||||
# new Proton SASL configuration:
|
||||
# maintain old behavior: allow PLAIN and ANONYMOUS
|
||||
# authentication. Override this using x-sasl-mechs below:
|
||||
self.pn_sasl.allow_insecure_mechs = True
|
||||
if 'x-require-auth' in self._properties:
|
||||
ra = self._properties['x-require-auth']
|
||||
self._pn_transport.require_auth(ra)
|
||||
if 'x-username' in self._properties:
|
||||
# maintain old behavior: allow PLAIN and ANONYMOUS
|
||||
# authentication. Override this using x-sasl-mechs below:
|
||||
self.pn_sasl.allow_insecure_mechs = True
|
||||
self._pn_connection.user = self._properties['x-username']
|
||||
if 'x-password' in self._properties:
|
||||
self._pn_connection.password = \
|
||||
|
2
setup.py
2
setup.py
@ -19,7 +19,7 @@
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
_VERSION = "2.0.1" # NOTE: update __init__.py too!
|
||||
_VERSION = "2.0.2" # NOTE: update __init__.py too!
|
||||
|
||||
# I hack, therefore I am (productive) Some distros (which will not be named)
|
||||
# don't use setup.py to install the proton python module. In this case, pip
|
||||
|
Loading…
Reference in New Issue
Block a user