Verified Commit 81455caa authored by Ziirish's avatar Ziirish

make fresh logins upon basic auth

parent 83ae7d1b
Pipeline #1633 passed with stages
in 4 minutes and 1 second
......@@ -12,7 +12,7 @@ Current
- Add: new ``bui-monitor`` processes pool + ``async`` backend to parallelize some requests `#278 <https://git.ziirish.me/ziirish/burp-ui/issues/278>`_
- Add: new `listen` and `listen_status` options in burp-2.2.10 `#279 <https://git.ziirish.me/ziirish/burp-ui/issues/279>`_
- Add: allow to hide selected clients/servers `#282 <https://git.ziirish.me/ziirish/burp-ui/issues/282>`_
- Add: allow to delete clients data upon removal `#232 <<https://git.ziirish.me/ziirish/burp-ui/issues/232>`_
- Add: allow to delete clients data upon removal `#232 <https://git.ziirish.me/ziirish/burp-ui/issues/232>`_
- Fix: sync pkgs requirements with burp-ui's `#300 <https://git.ziirish.me/ziirish/burp-ui/issues/300>`__
- Fix: wrong command suggestion `#296 <https://git.ziirish.me/ziirish/burp-ui/issues/296>`__
- Fix: allow templates removal `#290 <https://git.ziirish.me/ziirish/burp-ui/issues/290>`__
......
......@@ -281,7 +281,7 @@ class UserHandler(BUIuser):
@property
def backend(self):
return getattr(self.real, 'backend')
return getattr(self.real, 'backend', None)
def _load_prefs(self):
session['login'] = self.name
......
......@@ -46,9 +46,9 @@ def basic_login_from_request(request, app):
if auth:
from flask import session, g
app.logger.debug('Found Basic user: {}'.format(auth.username))
refresh = False
if 'login' in session and session['login'] != auth.username:
refresh = True
refresh = True
if 'login' in session and session['login'] == auth.username:
refresh = False
session['language'] = request.headers.get('X-Language', 'en')
user = app.uhandler.user(auth.username, refresh)
if user and user.active and user.login(auth.password):
......
Markdown is supported
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