summaryrefslogtreecommitdiffstats
path: root/pyload/remote/wsbackend
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/remote/wsbackend')
-rw-r--r--pyload/remote/wsbackend/AbstractHandler.py13
-rw-r--r--pyload/remote/wsbackend/Server.py5
2 files changed, 11 insertions, 7 deletions
diff --git a/pyload/remote/wsbackend/AbstractHandler.py b/pyload/remote/wsbackend/AbstractHandler.py
index 842d87473..e69ff2573 100644
--- a/pyload/remote/wsbackend/AbstractHandler.py
+++ b/pyload/remote/wsbackend/AbstractHandler.py
@@ -46,13 +46,12 @@ class AbstractHandler:
req.api = None #when api is set client is logged in
# allow login via session when webinterface is active
- if self.core.config['webinterface']['activated']:
- cookie = req.headers_in.getheader('Cookie')
- s = self.load_session(cookie)
- if s:
- uid = s.get('uid', None)
- req.api = self.api.withUserContext(uid)
- self.log.debug("WS authenticated user with cookie: %d" % uid)
+ cookie = req.headers_in.getheader('Cookie')
+ s = self.load_session(cookie)
+ if s:
+ uid = s.get('uid', None)
+ req.api = self.api.withUserContext(uid)
+ self.log.debug("WS authenticated user with cookie: %d" % uid)
self.on_open(req)
diff --git a/pyload/remote/wsbackend/Server.py b/pyload/remote/wsbackend/Server.py
index 02da44f04..9a6649ca9 100644
--- a/pyload/remote/wsbackend/Server.py
+++ b/pyload/remote/wsbackend/Server.py
@@ -67,6 +67,7 @@ _MAX_MEMORIZED_LINES = 1024
def import_ssl():
global _HAS_SSL, _HAS_OPEN_SSL
+ global ssl, OpenSSL
try:
import ssl
_HAS_SSL = True
@@ -77,6 +78,8 @@ def import_ssl():
except ImportError:
pass
+ return _HAS_OPEN_SSL or _HAS_SSL
+
class _StandaloneConnection(object):
"""Mimic mod_python mp_conn."""
@@ -648,6 +651,8 @@ class DefaultOptions:
private_key = ''
certificate = ''
ca_certificate = ''
+ tls_client_ca = ''
+ tls_client_auth = False
dispatcher = None
request_queue_size = _DEFAULT_REQUEST_QUEUE_SIZE
use_basic_auth = False