diff --git a/server/szurubooru/func/users.py b/server/szurubooru/func/users.py index 4b4cb30..f127d2f 100644 --- a/server/szurubooru/func/users.py +++ b/server/szurubooru/func/users.py @@ -17,7 +17,7 @@ def _get_avatar_path(name): def _get_avatar_url(user): if user.avatar_style == user.AVATAR_GRAVATAR: - return 'http://gravatar.com/avatar/%s?d=retro&s=%d' % ( + return 'https://gravatar.com/avatar/%s?d=retro&s=%d' % ( util.get_md5((user.email or user.name).lower()), config.config['thumbnails']['avatar_width']) else: diff --git a/server/szurubooru/tests/api/test_user_creating.py b/server/szurubooru/tests/api/test_user_creating.py index b2211f5..9162534 100644 --- a/server/szurubooru/tests/api/test_user_creating.py +++ b/server/szurubooru/tests/api/test_user_creating.py @@ -38,7 +38,7 @@ def test_creating_user(test_ctx, fake_datetime): user=test_ctx.user_factory(rank=db.User.RANK_REGULAR))) assert result == { 'avatarStyle': 'gravatar', - 'avatarUrl': 'http://gravatar.com/avatar/' + + 'avatarUrl': 'https://gravatar.com/avatar/' + '6f370c8c7109534c3d5c394123a477d7?d=retro&s=200', 'creationTime': datetime.datetime(1969, 2, 12), 'lastLoginTime': None, diff --git a/server/szurubooru/tests/api/test_user_retrieving.py b/server/szurubooru/tests/api/test_user_retrieving.py index 791e17d..c1f9bbd 100644 --- a/server/szurubooru/tests/api/test_user_retrieving.py +++ b/server/szurubooru/tests/api/test_user_retrieving.py @@ -53,7 +53,7 @@ def test_retrieving_single(test_ctx): 'creationTime': datetime.datetime(1997, 1, 1), 'lastLoginTime': None, 'avatarStyle': 'gravatar', - 'avatarUrl': 'http://gravatar.com/avatar/' + + 'avatarUrl': 'https://gravatar.com/avatar/' + '275876e34cf609db118f3d84b799a790?d=retro&s=200', 'email': False, 'commentCount': 0, diff --git a/server/szurubooru/tests/api/test_user_updating.py b/server/szurubooru/tests/api/test_user_updating.py index d553928..201e5c7 100644 --- a/server/szurubooru/tests/api/test_user_updating.py +++ b/server/szurubooru/tests/api/test_user_updating.py @@ -52,7 +52,7 @@ def test_updating_user(test_ctx): 'u1') assert result == { 'avatarStyle': 'gravatar', - 'avatarUrl': 'http://gravatar.com/avatar/' + + 'avatarUrl': 'https://gravatar.com/avatar/' + '6f370c8c7109534c3d5c394123a477d7?d=retro&s=200', 'creationTime': datetime.datetime(1997, 1, 1), 'lastLoginTime': None,