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

    Squid captive portal integration fix

    Scheduled Pinned Locked Moved Captive Portal
    2 Posts 2 Posters 1.6k 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.
    • D
      dig1234
      last edited by

      The squid3-devl package has an option to enable captive portal authentication, the script which glues this together seems to be a bit unfinished, here is what I did to get it working:

      open file /usr/pbi/squid-amd64/libexec/squid/check_ip.php
      starting on line 52 replace and insert following fixed lines:

      $result = sqlite_array_query($dbhandle, $query, SQLITE_ASSOC);
      if ($result){
        foreach ($result as $rownum => $row)
        {
      $cp_db[$rownum]=implode(",",$row);
          }
              sqlite_close($dbhandle);
      }

      There is one other bug which spams the squid access log with helperHandleRead: unexpected read from check_ip_portal #1, 4 bytes 'ERR
      that needs to be repaired. I believe we just need to check if STDIN is white space character and if so ignore. This doesn't affect functionality though.

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        Thanks for the contribution. I've merged it on squid3-dev pkg v 2.2.1

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

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