From 782bdd9b0f24d3d71f6d68a20b12d5c51c6d370e Mon Sep 17 00:00:00 2001 From: Matthias Kestenholz Date: Mon, 27 May 2024 12:48:14 +0200 Subject: [PATCH] INTERNAL_IPS may not be a list --- debug_toolbar/middleware.py | 2 +- docs/changes.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index 38cf92884..0513e2379 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -20,7 +20,7 @@ def show_toolbar(request): """ Default function to determine whether to show the toolbar on a given page. """ - internal_ips = settings.INTERNAL_IPS.copy() + internal_ips = list(settings.INTERNAL_IPS) try: # This is a hack for docker installations. It attempts to look diff --git a/docs/changes.rst b/docs/changes.rst index 1d66d1323..0bac18c20 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -5,6 +5,7 @@ Pending ------- * Removed some CSS which wasn't carefully limited to the toolbar's elements. +* Stopped assuming that ``INTERNAL_IPS`` is a list. 4.4.1 (2024-05-26)