Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    [FIX] SquidGuard "Proxy config" text cutoff/truncation caused by SSL ciphers

    Scheduled Pinned Locked Moved Cache/Proxy
    squidsquidguardsquidproxybug fixes
    1 Posts 1 Posters 121 Views 1 Watching
    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.
    • JonathanLeeJ Offline
      JonathanLee
      last edited by

      Hi everyone,

      If you are running a modernized Squid setup (like the Squid 7 branch) with heavy SSL/TLS inspection rules, you might have noticed a visual bug where the Proxy config preview box under Services > SquidGuard Proxy Filter > Log abruptly cuts off text right after the cipher suites.

      This is a purely cosmetic GUI bug that does not impact your actual proxy operations, but it prevents you from auditing your full configuration file through the web interface.

      ๐Ÿ” The Cause
      The bug lives in /usr/local/www/squidguard_log.php within the squidguard_prep_textareacont() function.

      The code uses jQueryโ€™s .html() method to dynamically push the configuration text into the browser layout. Because ssl-bump options are packed with complex raw characters (like !, +, and :), the browser misinterprets the data string as broken HTML formatting and quietly crashes the text rendering.

      ๐Ÿ› ๏ธ The Simple
      FixTo fix this, the script simply needs to handle the incoming configuration string as plain text rather than code instructions. Changing .html() to .text() solves the collision entirely.

      Open /usr/local/www/squidguard_log.php and update the function around line 115:

      Before:

      function squidguard_prep_textareacont($cont) {
      	$cont = squidguard_prepfor_JS($cont);
      	return "$('#reportarea').html(\"<br><pre id='pconf' name='pconf' wrap='hard' readonly></pre>\");" .
      		"$('#pconf').html('$cont');";
      }
      

      After:

      function squidguard_prep_textareacont($cont) {
      	$cont = squidguard_prepfor_JS($cont);
      	return "$('#reportarea').html(\"<br><pre id='pconf' name='pconf' wrap='hard' readonly></pre>\");" .
      		"$('#pconf').text('$cont');"; // Fixed here
      }
      
      

      Once saved, the preview pane immediately processes the entire configuration file flawlessly. Hopefully, this saves someone else some troubleshooting time!

      Also helps prevent Cross Site Scripting XSS

      Make sure to upvote

      1 Reply Last reply Reply Quote 1
      • First post
        Last post
      Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
      Privacy Policy · Cookie Policy