forked from CGM_Public/pretix_original
Easier PCI DSS compliance for payment pages (#4273)
* Assign names to compressed scripts * Make PCI-relevant pages detectable * Make payment summary markup more consistant to easy work in tracking plugin * Add docs note
This commit is contained in:
@@ -26,6 +26,7 @@ from pretix.base.signals import (
|
||||
register_payment_providers, register_sales_channel_types,
|
||||
register_ticket_outputs,
|
||||
)
|
||||
from pretix.presale.signals import html_head
|
||||
|
||||
|
||||
@receiver(register_ticket_outputs, dispatch_uid="output_dummy")
|
||||
@@ -61,3 +62,11 @@ class FoobarSalesChannel(SalesChannelType):
|
||||
@receiver(register_sales_channel_types, dispatch_uid="sc_dummy")
|
||||
def register_sc(sender, **kwargs):
|
||||
return [FoobarSalesChannel, FoobazSalesChannel]
|
||||
|
||||
|
||||
@receiver(html_head, dispatch_uid="dummy_html_head")
|
||||
def html_head_presale(sender, request=None, **kwargs):
|
||||
if getattr(request, 'pci_dss_payment_page', False):
|
||||
# No tracking scripts on PCI DSS relevant payment pages
|
||||
return ""
|
||||
return "<script>alert('BAD TRACKING SCRIPT')</script>"
|
||||
|
||||
Reference in New Issue
Block a user