Skip to content

I can no longer use iptools.IpRangeList for INTERNAL_IPS #1928

@quinox

Description

@quinox

Hello!

Long time happy user of DDT here.

With 782bdd9 I can no longer use iptools.IpRangeList with INTERNAL_IPS, it blows up when I want to whitelist a larger IP range such as IPv6. With smaller ranges such as 10.0.0.0/8 it won't blow up but it will delay every request significantly while DDT waits for IpRangeList to write out all the IP addresses.

INTERNAL_IPS = iptools.IpRangeList('127.0.0.1', '10/8', '::1', '1a:1a:1a:1a::/64')
Traceback (most recent call last):
  File "/mnt/drive/skeleton/virtual/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/mnt/drive/skeleton/virtual/lib/python3.10/site-packages/debug_toolbar/middleware.py", line 64, in __call__
    if not show_toolbar(request) or DebugToolbar.is_toolbar_request(request):
  File "/mnt/drive/skeleton/virtual/lib/python3.10/site-packages/debug_toolbar/middleware.py", line 23, in show_toolbar
    internal_ips = list(settings.INTERNAL_IPS)
OverflowError: cannot fit 'int' into an index-sized integer

For now I simplified my configuration to work around it. My requirements have changed a bit over the years and I can live with this simplified setup, but I just wanted to let you know in case this fallout was undesirable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy