1 parent
c1e8bc717a
commit
e1e521300b
2 files changed
+11
-3
No files matched your search
@@ -236,7 +236,10 @@ def login():
|
||||
response["_is_external_client"] = s().getBoolean(["server", "ipCheck", "enabled"]) \
|
||||
and not util_net.is_lan_address(remote_addr,
|
||||
additional_private=s().get(["server", "ipCheck", "trustedSubnets"]))
|
||||
return jsonify(response)
|
||||
|
||||
r = make_response(jsonify(response))
|
||||
r.delete_cookie("active_logout")
|
||||
return r
|
||||
|
||||
return make_response(("User unknown or password incorrect", 401, []))
|
||||
|
||||
@@ -254,7 +257,11 @@ def logout():
|
||||
# ... and from flask login (and principal)
|
||||
logout_user()
|
||||
|
||||
return NO_CONTENT
|
||||
# ... and send an active logout session cookie
|
||||
r = make_response(NO_CONTENT)
|
||||
r.set_cookie("active_logout", "true")
|
||||
|
||||
return r
|
||||
|
||||
|
||||
def _logout(user):
|
||||
|
||||
@@ -584,7 +584,8 @@ def passive_login():
|
||||
|
||||
elif settings().getBoolean(["accessControl", "autologinLocal"]) \
|
||||
and settings().get(["accessControl", "autologinAs"]) is not None \
|
||||
and settings().get(["accessControl", "localNetworks"]) is not None:
|
||||
and settings().get(["accessControl", "localNetworks"]) is not None \
|
||||
and not "active_logout" in flask.request.cookies:
|
||||
|
||||
autologin_as = settings().get(["accessControl", "autologinAs"])
|
||||
local_networks = _local_networks()
|
||||
|
||||
Reference in new issue
Block a user