From 51177e5cc79f9714b2b1d05793184f4310c06833 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 6 Feb 2019 17:01:40 +0100 Subject: [PATCH] Remove gravatar, as they are a privacy risk See https://meta.stackexchange.com/questions/44717/is-gravatar-a-privacy-risk or the Mozilla Known Trackers List. --- db.py | 12 ++++-------- requirements.txt | 2 +- static/nryg.less | 4 ---- templates/base.html | 1 - templates/minis/ryg.html | 2 +- 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/db.py b/db.py index a7b2da9f..841c6a26 100644 --- a/db.py +++ b/db.py @@ -17,7 +17,6 @@ import loldata from dirty import Dirty, DirtyDelta import sql_queries from flask import escape -import libgravatar import configparser import typing if typing.TYPE_CHECKING: @@ -119,7 +118,6 @@ class Royal(Base, Mini): role = Column(String) fiorygi = Column(Integer, default=0) member_since = Column(Date) - email = Column(String) _mini_full_name = "Royalnet" _mini_name = "ryg" @@ -135,12 +133,6 @@ class Royal(Base, Mini): def __repr__(self): return f"" - def get_gravatar_url(self): - if self.email is None: - return f"https://www.gravatar.com/avatar/{libgravatar.md5_hash(self.username)}?d=identicon&f=y" - gravatar = libgravatar.Gravatar(self.email) - return gravatar.get_image(default="identicon", use_ssl=True) - @classmethod def mini_get_single_from_royal(cls, session: Session, royal: "Royal"): return royal @@ -1324,6 +1316,10 @@ class MatchPartecipation(Base): return f"" +class IsaacQuest(Base, Mini): + ... + + # If run as script, create all the tables in the db if __name__ == "__main__": print("Creating new tables...") diff --git a/requirements.txt b/requirements.txt index 302919b3..9670f257 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,4 +16,4 @@ dice raven[flask] coloredlogs sentry_sdk -libgravatar \ No newline at end of file +steamleaderboards \ No newline at end of file diff --git a/static/nryg.less b/static/nryg.less index 8d5b47c9..abbb05ee 100644 --- a/static/nryg.less +++ b/static/nryg.less @@ -726,10 +726,6 @@ img { grid-column-start: 1; grid-column-end: 3; font-weight: bold; - - .player-image { - border-radius: 16px; - } } .member-status { diff --git a/templates/base.html b/templates/base.html index ab031e00..9c943137 100644 --- a/templates/base.html +++ b/templates/base.html @@ -24,7 +24,6 @@ {% endif %}