From 660ca42149b10d09c658e080f1e264cb30d787e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20L=C3=B3pez?= Date: Tue, 14 Apr 2026 18:57:30 +0200 Subject: [PATCH] Closes #21875: Allow subclasses of dict for API_TOKEN_PEPPERS --- netbox/utilities/security.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/utilities/security.py b/netbox/utilities/security.py index 47a18d265..be59f21f5 100644 --- a/netbox/utilities/security.py +++ b/netbox/utilities/security.py @@ -9,7 +9,7 @@ def validate_peppers(peppers): """ Validate the given dictionary of cryptographic peppers for type & sufficient length. """ - if type(peppers) is not dict: + if not isinstance(peppers, dict): raise ImproperlyConfigured("API_TOKEN_PEPPERS must be a dictionary.") for key, pepper in peppers.items(): if type(key) is not int: