mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-05-26 15:13:36 +00:00
Fix for new option login
This commit is contained in:
@@ -137,7 +137,8 @@ class TermWebSocket(Route, tornado.websocket.WebSocketHandler):
|
||||
self.callee = utils.User(name=user)
|
||||
except:
|
||||
self.callee = utils.User(name='nobody')
|
||||
else:
|
||||
elif (tornado.options.options.unsecure and not
|
||||
tornado.options.options.login):
|
||||
# if login is not required, we will use the same user as
|
||||
# butterfly is executed
|
||||
self.callee = utils.User()
|
||||
@@ -171,7 +172,9 @@ class TermWebSocket(Route, tornado.websocket.WebSocketHandler):
|
||||
) or not tornado.options.options.login:
|
||||
# User has been auth with ssl or is the same user as server
|
||||
# or login is explicitly turned off
|
||||
if not tornado.options.options.unsecure:
|
||||
if (
|
||||
not tornado.options.options.unsecure and
|
||||
tornado.options.options.login):
|
||||
# User is authed by ssl, setting groups
|
||||
try:
|
||||
os.initgroups(self.callee.name, self.callee.gid)
|
||||
|
||||
Reference in New Issue
Block a user