spring / uberserver

uberserver, a matchmaking/chat lobby server for the spring rts project
https://springrts.com/wiki/Uberserver
Other
33 stars 38 forks source link

crash on mix of collations #343

Closed silentwings closed 4 years ago

silentwings commented 5 years ago

2019-04-11 15:14:26 ERROR twistedserver.dataReceived:71 Error in handling data from client: exception: (_mysql_exceptions.OperationalError) (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='") [SQL: 'SELECT users.id AS users_id, users.username AS users_username, users.password AS users_password, users.randsalt AS users_randsalt, users.register_date AS users_register_date, users.last_login AS users_last_login, users.last_ip AS users_last_ip, users.last_id AS users_last_id, users.ingame_time AS users_ingame_time, users.access AS users_access, users.email AS users_email, users.bot AS users_bot \nFROM users \nWHERE users.username = %s \n LIMIT %s'] [parameters: ('воха', 1)] command: b'#1 LOGIN \xd0\xb2\xd0\xbe\xd1\x85\xd0\xb0 0 * SpringLobby 0.264 (unix x64)\t1794534327\ta m sp cl p\n' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 226, in execute self.errorhandler(self, exc, value) File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorvalue File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 217, in execute res = self._query(query) File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 378, in _query rowcount = self._do_query(q) File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 341, in _do_query db.query(q) File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 280, in query _mysql.connection.query(self, query) _mysql_exceptions.OperationalError: (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/lobby/uberserver/twistedserver.py", line 64, in dataReceived self.Handle(data.decode("utf-8")) File "/home/lobby/uberserver/Client.py", line 165, in Handle self.HandleProtocolCommands(self.data.split("\n"), flood_limits) File "/home/lobby/uberserver/Client.py", line 201, in HandleProtocolCommands self.HandleProtocolCommand(command) File "/home/lobby/uberserver/Client.py", line 171, in HandleProtocolCommand self._root.protocol._handle(self, cmd) File "protocol/Protocol.py", line 396, in _handle function(*([client] + fun_args)) File "protocol/Protocol.py", line 970, in in_LOGIN banned, reason = self.userdb.check_banned(username, client.ip_address) File "/home/lobby/uberserver/SQLUsers.py", line 509, in check_banned dbuser = self.sess().query(User).filter(User.username == username).first() File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2659, in first ret = list(self[0:1]) File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2457, in getitem return list(res) File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2761, in iter return self._execute_and_instances(context) File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement compiled_sql, distilled_params File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 185, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 226, in execute self.errorhandler(self, exc, value) File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorvalue File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 217, in execute res = self._query(query) File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 378, in _query rowcount = self._do_query(q) File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 341, in _do_query db.query(q) File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 280, in query _mysql.connection.query(self, query) sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='") [SQL: 'SELECT users.id AS users_id, users.username AS users_username, users.password AS users_password, users.randsalt AS users_randsalt, users.register_date AS users_register_date, users.last_login AS users_last_login, users.last_ip AS users_last_ip, users.last_id AS users_last_id, users.ingame_time AS users_ingame_time, users.access AS users_access, users.email AS users_email, users.bot AS users_bot \nFROM users \nWHERE users.username = %s \n LIMIT %s'] [parameters: ('воха', 1)]

silentwings commented 4 years ago

has not reoccurred, presumed freak accident