Data too long for column 'url'
With:
- allianceauth 2.6.2
- django-esi 1.6.0
- discourse 2.4.0
When a user tries to log into discourse, the SSO redirect gives server error 500. This started happening yesterday.
Looking at the allianceauth.log, i can see this error:
[05/Mar/2020 23:56:56] ERROR [django.request:228] Internal Server Error: /sso/login
Traceback (most recent call last):
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/MySQLdb/cursors.py", line 412, in _query
rowcount = self._do_query(q)
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/MySQLdb/cursors.py", line 375, in _do_query
db.query(q)
File "/home/aauth/venv/aauth/lib/python3.5/site-packages/MySQLdb/connections.py", line 276, in query
_mysql.connection.query(self, query)
_mysql_exceptions.DataError: (1406, "Data too long for column 'url' at row 1")
The only table in the db with a url column is esi_callbackredirect:
CREATE TABLE `esi_callbackredirect` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(254) NOT NULL,
...
This is set here: https://gitlab.com/allianceauth/django-esi/-/blob/3048bf3f96a926a6c171d61f84efe79218953a91/esi/models.py#L171
Edited by Stephen Shirley