From cff9ae6b18c1f5d5702272183dc826aedb1b3eb3 Mon Sep 17 00:00:00 2001 From: Martin Gross Date: Mon, 22 Jan 2024 12:15:21 +0100 Subject: [PATCH] Stripe: Filter statement_descriptor postfix for unacceptable characters --- src/pretix/plugins/stripe/payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/plugins/stripe/payment.py b/src/pretix/plugins/stripe/payment.py index 214635807..094499e5f 100644 --- a/src/pretix/plugins/stripe/payment.py +++ b/src/pretix/plugins/stripe/payment.py @@ -556,7 +556,7 @@ class StripeMethod(BasePaymentProvider): # the postfix. return '{code} {postfix}'.format( code=payment.order.code, - postfix=self.settings.postfix, + postfix=re.sub('[^a-zA-Z0-9 ]', '', str(self.settings.postfix)), )[:length] else: # If no custom postfix is set, we transmit the event slug and event name for backwards compatibility