From baf3cf04ec3781d0d260de2a42cf3cf63f9848b0 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Tue, 21 Jul 2026 10:01:17 +0200 Subject: [PATCH] fix import and missing license-header --- src/pretix/base/email.py | 2 +- src/pretix/helpers/ssrf.py | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/pretix/base/email.py b/src/pretix/base/email.py index dc0a59915d..19ec4dab5c 100644 --- a/src/pretix/base/email.py +++ b/src/pretix/base/email.py @@ -42,6 +42,7 @@ from pretix.base.templatetags.rich_text import ( markdown_compile_email, truelink_callback, ) from pretix.helpers.format import FormattedString, SafeFormatter, format_map +from pretix.helpers.ssrf import should_block_access from pretix.base.services.placeholders import ( # noqa get_available_placeholders, PlaceholderContext @@ -51,7 +52,6 @@ from pretix.base.services.placeholders import ( # noqa SimpleFunctionalTextPlaceholder as SimpleFunctionalMailTextPlaceholder, ) from pretix.base.settings import get_name_parts_localized # noqa -from pretix.helpers.ssrf import should_block_access logger = logging.getLogger('pretix.base.email') diff --git a/src/pretix/helpers/ssrf.py b/src/pretix/helpers/ssrf.py index 03598ee4a9..dd63b5e14c 100644 --- a/src/pretix/helpers/ssrf.py +++ b/src/pretix/helpers/ssrf.py @@ -1,5 +1,26 @@ -import ipaddress +# +# This file is part of pretix (Community Edition). +# +# Copyright (C) 2014-2020 Raphael Michel and contributors +# Copyright (C) 2020-today pretix GmbH and contributors +# +# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General +# Public License as published by the Free Software Foundation in version 3 of the License. +# +# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are +# applicable granting you additional permissions and placing additional restrictions on your usage of this software. +# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive +# this file, see . +# +# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +# details. +# +# You should have received a copy of the GNU Affero General Public License along with this program. If not, see +# . +# +import ipaddress _cgnat_net = ipaddress.ip_network('100.64.0.0/10')