diff src/server/server.py @ 1100:5976dcd42591

pages (g): use server's connect method to connect instead of bridge, this way normal Libervia workflow is used, and session attributes are initialised.
author Goffi <goffi@goffi.org>
date Fri, 01 Jun 2018 18:31:29 +0200
parents ea0d41ef3719
children e6ff5530900e
line wrap: on
line diff
--- a/src/server/server.py	Fri Jun 01 16:00:48 2018 +0200
+++ b/src/server/server.py	Fri Jun 01 18:31:29 2018 +0200
@@ -1643,7 +1643,11 @@
         if login.startswith('@'):
             raise failure.Failure(exceptions.DataError('No profile_key allowed'))
 
-        if '@' in login:
+        if login.startswith('guest@@') and login.count('@') == 2:
+            log.debug("logging a guest account")
+        elif '@' in login:
+            if login.count('@') != 1:
+                raise failure.Failure(exceptions.DataError('Invalid login: {login}'.format(login=login)))
             try:
                 login_jid = jid.JID(login)
             except (RuntimeError, jid.InvalidFormat, AttributeError):