server/users: use HTTPS for Gravatar
This commit is contained in:
parent
ef76cdaf8a
commit
5e47c5c0c6
4 changed files with 4 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue