Commit 084e3467 authored by Benjamin "Ziirish" SANS's avatar Benjamin "Ziirish" SANS
Browse files

various fix

parent 9c72bf6c
......@@ -31,7 +31,8 @@ class Resource(ResourcePlus):
def __init__(self, api=None, *args, **kwargs):
"""Constructor"""
self.username = getattr(current_user, 'name', None)
curr = current_user._get_current_object()
self.username = getattr(curr, 'name', None)
# if there is no ACL, assume everybody is admin
self.is_admin = True
if bui.acl:
......
......@@ -245,7 +245,8 @@ class Burp(Burp1):
except BUIserverException:
pass
except OSError as exp:
self.logger.critical(str(exp))
msg = str(exp)
self.logger.critical(msg)
def __exit__(self, typ, value, traceback):
"""try not to leave child process server side"""
......
......@@ -430,10 +430,7 @@ def login():
def logout():
session_manager.delete_session()
# cleanup the session at logout to avoid further reuse by another user
# we can keep the language since it is non critical imho
lang = session['language']
session.clear()
session['language'] = lang
logout_user()
return redirect(url_for('.home'))
......
......@@ -8,6 +8,7 @@
"""
import re
import uuid
import datetime
from flask import session, request
......@@ -147,7 +148,7 @@ class SessionManager(object):
def get_session_id(self):
"""Return the current session id"""
if self.app.storage and self.app.storage.lower() != 'default':
return getattr(session, 'sid', None)
return getattr(session, 'sid', str(uuid.uuid4()))
return None
def get_expired_sessions(self):
......
......@@ -41,7 +41,7 @@ burpui:
# - BURPUI_GID=5337
# - BURP_CLIENT_CONFIG=/tmp/burp.conf
# - BURP_SERVER_CONFIG=/etc/burp/burp-server.conf
# - DATABASE_URL=mysql://burpui:burpui@pgsql/burpuidb
# - DATABASE_URL=postgresql://burpui:burpui@pgsql/burpuidb
# - REDIS_SERVER=redis:6379
# - BURP_SERVER_ADDR=auto
# - TIMEZONE=Europe/Paris
......@@ -182,6 +182,8 @@ what is wrong.
If you are using `Gunicorn`_, it is possible you reached the limit of *status
children*. You can safely increase the ``max_status_children`` setting in your
*burp-server.conf* file to 15 (the default is 5).
You can also check your *status port* is open and/or accessible by your client.
To do so, you can run the ``burp -a m`` command.
How can I contribute?
---------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment