From cc45cd3d90167c34edfea451db3865127892bcae Mon Sep 17 00:00:00 2001 From: empty2fill Date: Sun, 20 Mar 2022 23:16:12 +0900 Subject: [PATCH] Fix character encoding issue with google accounts - https://github.com/Cisco-Talos/FIRST-plugin-ida/issues/28 (cherry picked from commit a38842c8bfcaac97582120c13dd1fc8e436451da) --- docker-compose.yml | 3 +++ server/www/migrations/0001_initial.py | 2 +- server/www/models.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a6a5e36..c8a8189 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,6 +24,9 @@ services: environment: - MYSQL_ROOT_PASSWORD=password12345 - MYSQL_DATABASE=first_db + command: + - --character-set-server=utf8 + - --collation-server=utf8_general_ci volumes: - ./data/mysql:/var/lib/mysql restart: always diff --git a/server/www/migrations/0001_initial.py b/server/www/migrations/0001_initial.py index 4682f24..9eeca86 100644 --- a/server/www/migrations/0001_initial.py +++ b/server/www/migrations/0001_initial.py @@ -107,7 +107,7 @@ class Migration(migrations.Migration): ('rank', models.BigIntegerField(default=0)), ('active', models.BooleanField(default=True)), ('service', models.CharField(max_length=16)), - ('auth_data', models.CharField(max_length=32768)), + ('auth_data', models.TextField()), ], options={ 'db_table': 'User', diff --git a/server/www/models.py b/server/www/models.py index 7a3bca4..0716882 100644 --- a/server/www/models.py +++ b/server/www/models.py @@ -41,7 +41,7 @@ class User(models.Model): active = models.BooleanField(default=True) service = models.CharField(max_length=16) - auth_data = models.CharField(max_length=32768) + auth_data = models.TextField() @property def user_handle(self):