Fix output error in ssh protocol. Resolves #1427

This commit is contained in:
Griatch 2018-01-27 15:35:27 +01:00
parent 05b0869a5c
commit 5e08ca3579

View file

@ -66,6 +66,7 @@ class SshProtocol(Manhole, session.Session):
here. here.
""" """
noisy = False
def __init__(self, starttuple): def __init__(self, starttuple):
""" """
@ -104,7 +105,7 @@ class SshProtocol(Manhole, session.Session):
# since we might have authenticated already, we might set this here. # since we might have authenticated already, we might set this here.
if self.authenticated_account: if self.authenticated_account:
self.logged_in = True self.logged_in = True
self.uid = self.authenticated_account.user.id self.uid = self.authenticated_account.id
self.sessionhandler.connect(self) self.sessionhandler.connect(self)
def connectionMade(self): def connectionMade(self):
@ -228,7 +229,7 @@ class SshProtocol(Manhole, session.Session):
""" """
if reason: if reason:
self.data_out(text=reason) self.data_out(text=((reason, ), {}))
self.connectionLost(reason) self.connectionLost(reason)
def data_out(self, **kwargs): def data_out(self, **kwargs):
@ -302,6 +303,9 @@ class SshProtocol(Manhole, session.Session):
class ExtraInfoAuthServer(SSHUserAuthServer): class ExtraInfoAuthServer(SSHUserAuthServer):
noisy = False
def auth_password(self, packet): def auth_password(self, packet):
""" """
Password authentication. Password authentication.
@ -327,6 +331,7 @@ class AccountDBPasswordChecker(object):
useful for the Realm. useful for the Realm.
""" """
noisy = False
credentialInterfaces = (credentials.IUsernamePassword,) credentialInterfaces = (credentials.IUsernamePassword,)
def __init__(self, factory): def __init__(self, factory):
@ -362,6 +367,8 @@ class PassAvatarIdTerminalRealm(TerminalRealm):
""" """
noisy = False
def _getAvatar(self, avatarId): def _getAvatar(self, avatarId):
comp = components.Componentized() comp = components.Componentized()
user = self.userFactory(comp, avatarId) user = self.userFactory(comp, avatarId)
@ -383,6 +390,8 @@ class TerminalSessionTransport_getPeer(object):
""" """
noisy = False
def __init__(self, proto, chainedProtocol, avatar, width, height): def __init__(self, proto, chainedProtocol, avatar, width, height):
self.proto = proto self.proto = proto
self.avatar = avatar self.avatar = avatar
@ -440,7 +449,6 @@ def makeFactory(configdict):
""" """
Creates the ssh server factory. Creates the ssh server factory.
""" """
pubkeyfile = os.path.join(_GAME_DIR, "server", "ssh-public.key") pubkeyfile = os.path.join(_GAME_DIR, "server", "ssh-public.key")
privkeyfile = os.path.join(_GAME_DIR, "server", "ssh-private.key") privkeyfile = os.path.join(_GAME_DIR, "server", "ssh-private.key")