Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SquidGuard: Target categories: Edit: URLs List -> ERROR in last octett

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 3 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Nachtfalke
      last edited by

      Hi,

      i have aproblem in the "target categories" tab when editing "URLs list".

      If I use the following URL it is not working:

      
      172.171.110.1/alisa
      172.171.110.2/alisa
      172.171.110.3/alisa
      172.171.110.4/alisa
      172.171.110.5/alisa
      172.171.110.6/alisa
      172.171.110.7/alisa
      172.171.110.8/alisa
      172.171.110.9/alisa
      
      

      In the last octett there are only numbers from 1 till 9.

      It is working when using numbers which are higher than 9.
      so this will work:

      
      172.171.110.10/alisa
      172.171.110.123/alisa
      172.171.110.57/alisa
      
      

      But what is strange for me is that this is working, too:

      
      172.171.110.07/alisa
      172.171.110.04/alisa
      
      

      I had a look in the .inc and .xml files but didn't found why this is not working.
      But would be really nice if this could be fixed.

      Thanks
      error.png
      error.png_thumb

      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke
        last edited by

        isn't there anyone else having this issue ? is it just my configuration ?

        1 Reply Last reply Reply Quote 0
        • D
          doccocaubai
          last edited by

          @Nachtfalke:

          isn't there anyone else having this issue ? is it just my configuration ?

          Same as me. I think this is the bug of SquidGuard.

          Le Trung Thanh
          Network Engineer
          Mobile: +84982251818

          1 Reply Last reply Reply Quote 0
          • N
            Nachtfalke
            last edited by

            Ok, now we just have to find the bug :D

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              That isn't meant to use IPs there. The regex in the function is meant to match domain names only. It just happens that the IPs match the regex when the last item after the last . before / is 2 characters or more.

              In /usr/local/pkg/squidguard_configurator.inc at line 1545

              # url as 'domain/path': 'mydomain.com/index.php'
              function is_dest_url($url)
              {
                  $fmt  = "[a-zA-Z0-9_-]";
              
                  if (empty($url)) return false;
                  if (eregi("^(($fmt){1,}\.){1,}($fmt){2,}(/(.[^\*][^ ])*)", $url)) return true;
                  return false;
              }
              
              

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.