From 7e760d4a564f729ff69d3f21f7cbc89837bbe97d Mon Sep 17 00:00:00 2001 From: Trent Bartlem Date: Wed, 3 Feb 2016 21:14:17 +1000 Subject: [PATCH 1/2] log api key invalidation at INFO level Deletion of characters associated with an API key is logged at INFO. However, the reason that an API key is marked invalid in the first place is only logged at DEBUG, so if you have debug logging disabled, you won't know why. --- services/managers/eve_api_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/managers/eve_api_manager.py b/services/managers/eve_api_manager.py index 6d5f1964..1f17bd73 100644 --- a/services/managers/eve_api_manager.py +++ b/services/managers/eve_api_manager.py @@ -287,11 +287,11 @@ class EveApiManager(): def validate_member_api(api_id, api_key): if settings.MEMBER_API_ACCOUNT: if EveApiManager.check_api_is_type_account(api_id, api_key) is not True: - logger.debug("Api id %s is not type account as required for members - failed validation." % api_id) + logger.info("Api id %s is not type account as required for members - failed validation." % api_id) return False if EveApiManager.check_api_is_full(api_id, api_key) is not True: - logger.debug("Api id %s does not meet member access mask requirements - failed validation." % api_id) + logger.info("Api id %s does not meet member access mask requirements - failed validation." % api_id) return False return True @@ -299,9 +299,9 @@ class EveApiManager(): def validate_blue_api(api_id, api_key): if settings.BLUE_API_ACCOUNT: if EveApiManager.check_api_is_type_account(api_id, api_key) is not True: - logger.debug("Api id %s is not type account as required for blues - failed validation." % api_id) + logger.info("Api id %s is not type account as required for blues - failed validation." % api_id) return False if EveApiManager.check_blue_api_is_full(api_id, api_key) is not True: - logger.debug("Api id %s does not meet minimum blue access mask requirements - failed validation." % api_id) + logger.info("Api id %s does not meet minimum blue access mask requirements - failed validation." % api_id) return False return True From 82f8141ff72108710ab60803db60e9bdff7dcace Mon Sep 17 00:00:00 2001 From: kallama Date: Wed, 3 Feb 2016 16:08:00 -0800 Subject: [PATCH 2/2] Eve avatar url as https Eve avatar url should be https instead of http so you don't get a mixed content warning if you use https on your forum. The ultimate solution would be http/https agnostic with :// instead, but I don't know if that would work in this file. --- services/managers/phpbb3_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/managers/phpbb3_manager.py b/services/managers/phpbb3_manager.py index 1ffe7046..bb38aa37 100755 --- a/services/managers/phpbb3_manager.py +++ b/services/managers/phpbb3_manager.py @@ -47,7 +47,7 @@ class Phpbb3Manager: @staticmethod def __add_avatar(username, characterid): logger.debug("Adding EVE character id %s portrait as phpbb avater for user %s" % (characterid, username)) - avatar_url = "http://image.eveonline.com/Character/" + characterid + "_64.jpg" + avatar_url = "https://image.eveonline.com/Character/" + characterid + "_64.jpg" cursor = connections['phpbb3'].cursor() userid = Phpbb3Manager.__get_user_id(username) cursor.execute(Phpbb3Manager.SQL_ADD_USER_AVATAR, [avatar_url, userid])