Source code for univention.portal.handlers.navigation_handler

# Univention Portal
#
# SPDX-FileCopyrightText: 2019-2025 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only

import ipaddress
import re
from urllib.parse import urlparse

import tornado.web
from ldap.dn import str2dn

from univention.portal.handlers.portal_resource import PortalResource


RE_FQDN = re.compile(r'(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}\.?$)')