diff --git a/src/pretix/plugins/paypal2/templates/pretixplugins/paypal2/presale_head.html b/src/pretix/plugins/paypal2/templates/pretixplugins/paypal2/presale_head.html index 35ea3046d6..f3d0b4cfe8 100644 --- a/src/pretix/plugins/paypal2/templates/pretixplugins/paypal2/presale_head.html +++ b/src/pretix/plugins/paypal2/templates/pretixplugins/paypal2/presale_head.html @@ -2,7 +2,7 @@ {% load compress %} {% load i18n %} -{% compress js %} +{% compress js file paypal %} {% endcompress %} diff --git a/src/pretix/plugins/paypal2/views.py b/src/pretix/plugins/paypal2/views.py index 2245d82b80..a59a83daaf 100644 --- a/src/pretix/plugins/paypal2/views.py +++ b/src/pretix/plugins/paypal2/views.py @@ -185,6 +185,10 @@ class XHRView(View): class PayView(PaypalOrderView, TemplateView): template_name = '' + def dispatch(self, request, *args, **kwargs): + self.request.pci_dss_payment_page = True + return super().dispatch(request, *args, **kwargs) + def get(self, request, *args, **kwargs): if self.payment.state != OrderPayment.PAYMENT_STATE_CREATED: return self._redirect_to_order() diff --git a/src/pretix/plugins/stripe/templates/pretixplugins/stripe/presale_head.html b/src/pretix/plugins/stripe/templates/pretixplugins/stripe/presale_head.html index b2d68e1877..40537aa609 100644 --- a/src/pretix/plugins/stripe/templates/pretixplugins/stripe/presale_head.html +++ b/src/pretix/plugins/stripe/templates/pretixplugins/stripe/presale_head.html @@ -2,10 +2,10 @@ {% load compress %} {% load i18n %} -{% compress js %} +{% compress js file stripe %} {% endcompress %} -{% compress css %} +{% compress css file stripe %} {% endcompress %} {% if testmode %} diff --git a/src/pretix/presale/checkoutflow.py b/src/pretix/presale/checkoutflow.py index a0afcb8ca1..7128e18730 100644 --- a/src/pretix/presale/checkoutflow.py +++ b/src/pretix/presale/checkoutflow.py @@ -1263,6 +1263,7 @@ class PaymentStep(CartMixin, TemplateFlowStep): def post(self, request): self.request = request + self.request.pci_dss_payment_page = True if "remove_payment" in request.POST: self._remove_payment(request.POST["remove_payment"]) @@ -1427,6 +1428,10 @@ class PaymentStep(CartMixin, TemplateFlowStep): return True + def get(self, request): + self.request.pci_dss_payment_page = True + return super().get(request) + class ConfirmStep(CartMixin, AsyncAction, TemplateFlowStep): priority = 1001 diff --git a/src/pretix/presale/signals.py b/src/pretix/presale/signals.py index 97bbd7e06c..920466adc5 100644 --- a/src/pretix/presale/signals.py +++ b/src/pretix/presale/signals.py @@ -78,6 +78,11 @@ of every page in the frontend. You will get the request as the keyword argument ``request`` and are expected to return plain HTML. As with all plugin signals, the ``sender`` keyword argument will contain the event. + +**Note:** If PCI DSS compliance is important to you and you keep an inventory according to +rule 6.4.3 of PCI DSS, all plugins that are not required to load on a payment page should +not return additional JavaScripts if ``getattr(request, 'pci_dss_payment_page', False)`` +is ``True``. """ seatingframe_html_head = EventPluginSignal() @@ -112,6 +117,11 @@ of every page in the frontend. You will get the request as the keyword argument ``request`` and are expected to return plain HTML. As with all plugin signals, the ``sender`` keyword argument will contain the event. + +**Note:** If PCI DSS compliance is important to you and you keep an inventory according to +rule 6.4.3 of PCI DSS, all plugins that are not required to load on a payment page should +not return additional JavaScripts if ``getattr(request, 'pci_dss_payment_page', False)`` +is ``True``. """ footer_link = EventPluginSignal() diff --git a/src/pretix/presale/templates/pretixpresale/base.html b/src/pretix/presale/templates/pretixpresale/base.html index 4c86ec626b..ba10209a13 100644 --- a/src/pretix/presale/templates/pretixpresale/base.html +++ b/src/pretix/presale/templates/pretixpresale/base.html @@ -8,7 +8,7 @@