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

    SquidGuard does not allow characters in domains like "äöü" like www.müller.de

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 1.2k 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,

      domains allow characters like äöü like www.müller.de
      But the regex in squidguard_configurator.inc does not allow these characters. I am no regex expert that's why I post this here and hope that someone can fix that.

      I think in must be in these lines:
      Line 1620:

      
      # ------------------------------------------------------------------------------
      # is_domain_valid - check domain format
      # ------------------------------------------------------------------------------
      function is_domain_valid($domain)
      {
          $dm_fmt = "([a-z0-9\-]{1,})";
          $dm_fmt = "/^(($dm_fmt{1,}\.){1,}$dm_fmt{2,})+$/i"; # example: (my.)(super.)(domain.)com
          return is_string($domain) && preg_match($dm_fmt, trim($domain));
      }
      
      

      Line 1575:

      
      # url as 'domain/path': 'mydomain.com/index.php'
      function is_dest_url($url)
      {
          $fmt = "[a-zA-Z0-9_-]";
      
          if (empty($url)) return false;
          if (preg_match("/^(($fmt){1,}\.){1,}($fmt){2,}(\/(.[^\*][^ ])*)/i", $url)) return true;
          return false;
      }
      
      
      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by

        You url www.müller.de will be converted by browser to punycode http://www.xn–mller-kva.de/ ( SG view last url only )
        You must use one of services ( for example http://www.charset.org/punycode.php ) for converting you national url to punycode and use this in the SG filter.

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

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

          @dvserg:

          You url www.müller.de will be converted by browser to punycode http://www.xn–mller-kva.de/ ( SG view last url only )
          You must use one of services ( for example http://www.charset.org/punycode.php ) for converting you national url to punycode and use this in the SG filter.

          Great! I never heard of that. Thank you very much!

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