diff --git a/Dockerfile b/Dockerfile index 9ce9b4e6ad..f9d34ec1c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ ENV PYTHONUNBUFFERED 1 # Ref: https://github.com/pyca/cryptography/issues/5776 ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1 -ENV INVENTREE_LOG_LEVEL="INFO" +ENV INVENTREE_LOG_LEVEL="WARNING" ENV INVENTREE_DOCKER="true" # InvenTree paths diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index f3f9c6466b..6d62f1302d 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -875,29 +875,31 @@ REMOTE_LOGIN_HEADER = get_setting('INVENTREE_REMOTE_LOGIN_HEADER', CONFIG.get('r # Markdownify configuration # Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html -MARKDOWNIFY_WHITELIST_TAGS = [ - 'a', - 'abbr', - 'b', - 'blockquote', - 'em', - 'h1', 'h2', 'h3', - 'i', - 'img', - 'li', - 'ol', - 'p', - 'strong', - 'ul' -] - -MARKDOWNIFY_WHITELIST_ATTRS = [ - 'href', - 'src', - 'alt', -] - -MARKDOWNIFY_BLEACH = False +MARKDOWNIFY = { + 'default': { + 'BLEACH': True, + 'WHITELIST_ATTRS': [ + 'href', + 'src', + 'alt', + ], + 'WHITELIST_TAGS': [ + 'a', + 'abbr', + 'b', + 'blockquote', + 'em', + 'h1', 'h2', 'h3', + 'i', + 'img', + 'li', + 'ol', + 'p', + 'strong', + 'ul' + ], + } +} # Error reporting SENTRY_ENABLED = get_setting('INVENTREE_SENTRY_ENABLED', CONFIG.get('sentry_enabled', False)) diff --git a/InvenTree/plugin/builtin/integration/test_core_notifications.py b/InvenTree/plugin/builtin/integration/test_core_notifications.py index 1ff60c74b1..88c166bf78 100644 --- a/InvenTree/plugin/builtin/integration/test_core_notifications.py +++ b/InvenTree/plugin/builtin/integration/test_core_notifications.py @@ -1,5 +1,7 @@ """Tests for core_notifications.""" +from django.core import mail + from part.test_part import BaseNotificationIntegrationTest from plugin import registry from plugin.builtin.integration.core_notifications import \ @@ -12,6 +14,9 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest): def test_email(self): """Ensure that the email notifications run.""" + # No email should be send + self.assertEqual(len(mail.outbox), 0) + # enable plugin and set mail setting to true plugin = registry.plugins.get('corenotificationsplugin') plugin.set_setting('ENABLE_NOTIFICATION_EMAILS', True) @@ -25,3 +30,6 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest): # run through self._notification_run(CoreNotificationsPlugin.EmailNotification) + + # Now one mail should be send + self.assertEqual(len(mail.outbox), 1) diff --git a/requirements.in b/requirements.in index 844ffe6b3b..dde42bbd8f 100644 --- a/requirements.in +++ b/requirements.in @@ -1,6 +1,7 @@ # Please keep this list sorted - if you pin a version provide a reason Django<4 # Django package coreapi # API documentation for djangorestframework +cryptography==3.4.8 # Core cryptographic functionality django-allauth # SSO for external providers via OpenID django-allauth-2fa # MFA / 2FA django-cleanup # Automated deletion of old / unused uploaded files diff --git a/requirements.txt b/requirements.txt index cfb733a184..27b5cf7493 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,8 +30,10 @@ coreapi==2.3.3 # via -r requirements.in coreschema==0.0.4 # via coreapi -cryptography==37.0.2 - # via pyjwt +cryptography==3.4.8 + # via + # -r requirements.in + # pyjwt cssselect2==0.6.0 # via weasyprint defusedxml==0.7.1